Beispiel #1
0
 public ResultCalculation(string vcode)
 {
     verifyCode = vcode;
     dalClarity = new DJK.DAL.admin_Clarity();
     dalData    = new DJK.DAL.admin_MedicalData();
     dalSource  = new DJK.DAL.admin_MedicalSource();
     modelData  = new DJK.Model.djk_cloudData();
     dal        = new DJK.DAL.djk_cloudData();
 }
Beispiel #2
0
        private void button6_Click(object sender, EventArgs e)
        {
            OpenFileDialog file1 = new OpenFileDialog();

            if (file1.ShowDialog() == DialogResult.OK)
            {
                string filename = file1.FileName;

                System.Data.DataTable dt          = OpenCSV(filename, 0, 0, 0, 0, false);
                int                       rows    = dt.Rows.Count;
                List <string>             sqlList = new List <string>();
                int                       added   = 0;
                DJK.DAL.admin_MedicalData dal     = new DJK.DAL.admin_MedicalData();
                if (rows > 0)
                {
                    sqlList.Add("delete admin_medicalSource");
                    foreach (DataRow dr in dt.Rows)
                    {
                        string sql = string.Format("insert into admin_medicalSource(medicalID,Source,SourceTable,SourceNum,SourceID) values ({0},'{1}','{2}',{3},{4})", dr[0].ToString(), "matrix" + dr[2].ToString(), "matrix", dr[2].ToString(), int.Parse(dr[2].ToString() + 322));
                        //int tre = dal.runSql(sql);
                        //added += tre;
                        sqlList.Add(sql);
                    }
                    //DJK.DAL.admin_MedicalData dal = new DJK.DAL.admin_MedicalData();
                    added = dal.insertBulk(sqlList);
                    if (added > 0)
                    {
                        textBox1.AppendText("Source导入" + rows + "条数据" + "\n");
                    }
                    else
                    {
                        textBox1.AppendText("Source导入失败" + "\n");
                    }
                }
                else
                {
                    textBox1.AppendText("文件中没有数据" + "\n");
                }
            }
        }
Beispiel #3
0
        private void button4_Click_1(object sender, EventArgs e)
        {
            OpenFileDialog file1 = new OpenFileDialog();

            if (file1.ShowDialog() == DialogResult.OK)
            {
                string filename = file1.FileName;

                System.Data.DataTable dt          = OpenCSV(filename, 0, 0, 0, 0, true);
                int                       rows    = dt.Rows.Count;
                List <string>             sqlList = new List <string>();
                int                       added   = 0;
                DJK.DAL.admin_MedicalData dal     = new DJK.DAL.admin_MedicalData();
                if (rows > 0)
                {
                    sqlList.Add("delete admin_medicalData");
                    foreach (DataRow dr in dt.Rows)
                    {
                        string sql = string.Format("insert into admin_medicalData(ParentID,ID,Code,Item) values ({0},{1},'{2}','{3}')", dr[0].ToString(), dr[1].ToString(), dr[2].ToString(), dr[3].ToString().Replace("'", "''"));
                        //int tre = dal.runSql(sql);
                        //added += tre;
                        sqlList.Add(sql);
                    }
                    //DJK.DAL.admin_MedicalData dal = new DJK.DAL.admin_MedicalData();
                    added = dal.insertBulk(sqlList);
                    if (added > 0)
                    {
                        textBox1.AppendText("Trees导入" + rows + "条数据" + "\n");
                    }
                    else
                    {
                        textBox1.AppendText("Trees导入失败" + "\n");
                    }
                }
                else
                {
                    textBox1.AppendText("文件中没有数据" + "\n");
                }
            }
        }