speng887 2014-01-17 03:29
浏览 896

帮忙将下面的php语言转换成c#

下面这些转换成C#,该怎么转?
<?php
class Application_Model_Checknote{
private $db;
private $incheck='in_check';
private $outcheck='out_check';
private $table=array('check_office'=>'patient_check_office','out_check'=>'patient_out_check',
'in_check'=>'patient_in_check','check_note'=>'patient_check_note','check_note_lab'=>'patient_check_note_lab',
'check_note_item'=>'patient_check_item_note','check_note_lab'=>'patient_check_note_lab');
private $type=array('in_check'=>'住院','out_check'=>'门诊');
private $case=array('in_check'=>1,'out_check'=>0);
private $kind=array('心电'=>0,'B超'=>0,'彩超'=>0,'检验'=>1,'放射'=>2,'CT'=>2,'MRI'=>2,'CR'=>2,'DR'=>2,'DX'=>2,'MR'=>2);
public function __construct(){

}
public function getCheckList($icno){
    return array_merge($this->getOutCheck($icno),$this->getInCheck($icno));
}
private function getOutCheck($icno){
    return $this->getCheck($this->outcheck, $icno);
}
private function getInCheck($icno){
    return $this->getCheck($this->incheck, $icno);
}
private function getCheck($type,$icno){
    $data=array();
    $outsql="SELECT b.s_kind,a.n_serial,a.s_check_sn,a.s_check_name,CONVERT(varchar(100),a.d_check_time,23) as d_check_time
             FROM ".$this->table[$type]." as a,
                ".$this->table['check_office']." as b
            WHERE ( a.s_office_check = b.s_code ) AND ( a.s_ic_no = '".$icno."' ) AND
                ( a.s_charge_mark = '1' ) ";
    $res=$this->db->query($outsql);
    if(count($res)>0){
        foreach($res as $r){
            $data[]=array('i'=>$this->case[$type],'type'=>$this->type[$type],'checksn'=>$r['s_check_sn'],'kind'=>$r['s_kind'],'k'=>$this->kind[$r['s_kind']],
            'serial'=>$r['n_serial'],'checkname'=>$r['s_check_name'],'checktime'=>$r['d_check_time']);
        }
    }
    return $data;
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 运筹学排序问题中的在线排序
    • ¥15 关于#flink#的问题:关于docker部署flink集成hadoop的yarn,请教个问题flink启动yarn-session.sh连不上hadoop
    • ¥30 求一段fortran代码用IVF编译运行的结果
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 lammps拉伸应力应变曲线分析
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题