public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 DeliveryModel rm = new DeliveryModel(); result.table = rm.MedicineDisplayInfo(); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["Sendstate"].ToString()); if (bstatus == 1) { return("已发货"); } else { return("待发货"); } }; result.FieldFormator.Register("Sendstate", proc2); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGrid1DataHandler2(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp); HospitalModel hm = new HospitalModel(); result.table = hm.findwarningtime("1"); dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { if (dr["status"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; result.FieldFormator.Register("status", proc); return(result); }
} //提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string Clearing = ""; if (p.extParam.ContainsKey("Clearing")) { Clearing = p.extParam["Clearing"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string ClearingS = ""; if (p.extParam.ContainsKey("ClearingS")) { ClearingS = p.extParam["ClearingS"]; } result.table = rm.CheckListInfo(Clearing, ClearingS, STime, ETime); dotNetFlexGrid.FieldFormatorHandle proc61 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["State"].ToString()); if (a == 1) { return("已结算"); } else { return("未结算"); } }; result.FieldFormator.Register("State", proc61); return(result); }
/// <summary> /// 大屏显示 /// </summary> /// <param name="p"></param> /// <returns></returns> public dotNetFlexGrid.DataHandlerResult FlexGrid2DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp); HospitalModel hm = new HospitalModel(); result.table = hm.findInfo(); dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { if (dr["DrugDisplayState"].ToString() == "0") { return("<span style='color:red'>开启</span>"); } else { return("关闭"); } }; result.FieldFormator.Register("DrugDisplayState", proc); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { if (dr["ChineseDisplayState"].ToString() == "0") { return("<span style='color:red'>开启</span>"); } else { return("关闭"); } }; result.FieldFormator.Register("ChineseDisplayState", proc1); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { if (dr["DrugSendDisplayState"].ToString() == "0") { return("<span style='color:red'>开启</span>"); } else { return("关闭"); } }; result.FieldFormator.Register("DrugSendDisplayState", proc2); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 string pspnum = ""; if (p.extParam.ContainsKey("PspNum")) { pspnum = p.extParam["PspNum"]; } TeModel tm = new TeModel(); result.table = tm.searchTisaneClass(pspnum);//调用演示的数据生成函数产生模拟数据 dotNetFlexGrid.FieldFormatorHandle proca = delegate(DataRow dr) { string z = ""; if (dr["bs"].ToString() == "") { String az = dr["bs"].ToString(); az = "3"; if (az == "3") { z = "无"; } } else { int az = Convert.ToInt32(dr["bs"].ToString()); if (az == 1) { z = "泡药完成"; } } return(z); }; result.FieldFormator.Register("bs", proca); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 string hospitalID = "0"; if (p.extParam.ContainsKey("hospitalID")) { hospitalID = p.extParam["hospitalID"]; } string Pspnum = "0"; if (p.extParam.ContainsKey("Pspnum")) { Pspnum = p.extParam["Pspnum"]; } string time = "0"; if (p.extParam.ContainsKey("time")) { time = p.extParam["time"]; } string patient = "0"; if (p.extParam.ContainsKey("patient")) { patient = p.extParam["patient"]; } string tisaneid = "0"; if (p.extParam.ContainsKey("tisaneid")) { tisaneid = p.extParam["tisaneid"]; } string doper = "0"; if (p.extParam.ContainsKey("doper")) { doper = p.extParam["doper"]; } string jftime = System.DateTime.Now.ToString("yyyy-MM-dd"); if (p.extParam.ContainsKey("JTime")) { jftime = p.extParam["JTime"]; } if (Pspnum == "") { Pspnum = "0"; } if (time == "") { time = "0"; } if (patient == "") { patient = "0"; } if (tisaneid == "") { tisaneid = "0"; } if (doper == "") { doper = "0"; } RecipeModel rm = new RecipeModel(); result.table = rm.findRecipeInfo(hospitalID, Pspnum, time, patient, tisaneid, doper, jftime); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 //result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 string typeofmachine = "3"; if (p.extParam.ContainsKey("typeofmachine")) { typeofmachine = p.extParam["typeofmachine"]; } if (typeofmachine == "") { typeofmachine = "3"; } meRoomModel mrm = new meRoomModel(); result.table = mrm.findallmachineinfo(typeofmachine); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["mark"].ToString()); if (bstatus == 0) { return("煎药机"); } else { return("包装机"); } }; result.FieldFormator.Register("mark", proc1); dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { if (dr["usingstatus"].ToString() == "启用") { return("<span style='color:red'>启用</span>"); } else { return("<span style='color:black'>停用</span>"); } }; result.FieldFormator.Register("usingstatus", proc); //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 //if (p.sortname.Length > 0 && p.sortorder.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.Sort = (p.sortname + " " + p.sortorder); // result.table = dv.ToTable(); //} ////处理默认查询,即Button1_Click中指定的DefaultSearch查询参数 //if (p.defaultSearch.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.defaultSearch["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含附加参数的话,再来模拟查询,原谅我真的很懒。 //if (p.extParam.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.extParam["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含快速查询参数,则进行快速查询 //if (p.qop != dotNetFlexGrid.SerchParamConfigOperater.None && p.qtype.Length > 0 && p.query.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // if (p.qop == dotNetFlexGrid.SerchParamConfigOperater.Like) // dv.RowFilter = p.qtype + " Like '%" + p.query + "%'"; // else // dv.RowFilter = p.qtype + " = '" + p.query + "'"; // result.table = dv.ToTable(); //} return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridDrugDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 string tisanenum = "0"; if (p.extParam.ContainsKey("tisanenum")) { tisanenum = p.extParam["tisanenum"]; } TeModel tm = new TeModel(); result.table = tm.getTisaneInfoByTisanenum(tisanenum); //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 //if (p.sortname.Length > 0 && p.sortorder.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.Sort = (p.sortname + " " + p.sortorder); // result.table = dv.ToTable(); //} ////处理默认查询,即Button1_Click中指定的DefaultSearch查询参数 //if (p.defaultSearch.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.defaultSearch["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含附加参数的话,再来模拟查询,原谅我真的很懒。 //if (p.extParam.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.extParam["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含快速查询参数,则进行快速查询 //if (p.qop != dotNetFlexGrid.SerchParamConfigOperater.None && p.qtype.Length > 0 && p.query.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // if (p.qop == dotNetFlexGrid.SerchParamConfigOperater.Like) // dv.RowFilter = p.qtype + " Like '%" + p.query + "%'"; // else // dv.RowFilter = p.qtype + " = '" + p.query + "'"; // result.table = dv.ToTable(); //} dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { string a = ""; int tstatus = Convert.ToInt32(dr["tisanestatus"].ToString()); if (tstatus == 0) { a = "开始煎药"; } else if (tstatus == 1) { a = "煎药完成"; } /* else * { * a = "煎药"; * }*/ return(a); }; result.FieldFormator.Register("tisanestatus", proc); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp); HospitalModel hm = new HospitalModel(); result.table = hm.findPdaImgSwitchInfo(); dotNetFlexGrid.FieldFormatorHandle tiaoji = delegate(DataRow dr) { if (dr["tiaoji"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; dotNetFlexGrid.FieldFormatorHandle fuhe = delegate(DataRow dr) { if (dr["fuhe"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; dotNetFlexGrid.FieldFormatorHandle paoyao = delegate(DataRow dr) { if (dr["paoyao"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; dotNetFlexGrid.FieldFormatorHandle jianyao = delegate(DataRow dr) { if (dr["jianyao"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; dotNetFlexGrid.FieldFormatorHandle baozhuang = delegate(DataRow dr) { if (dr["baozhuang"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; dotNetFlexGrid.FieldFormatorHandle fahuo = delegate(DataRow dr) { if (dr["fahuo"].ToString() == "1") { return("<span style='color:red'>开启</span>"); } else { return("<span style='color:black'>关闭</span>"); } }; result.FieldFormator.Register("tiaoji", tiaoji); result.FieldFormator.Register("fuhe", fuhe); result.FieldFormator.Register("paoyao", paoyao); result.FieldFormator.Register("jianyao", jianyao); result.FieldFormator.Register("baozhuang", baozhuang); result.FieldFormator.Register("fahuo", fahuo); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridRecipeDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string hospitalId = "0"; if (p.extParam.ContainsKey("hospitalId")) { hospitalId = p.extParam["hospitalId"]; } string pspnum = ""; if (p.extParam.ContainsKey("pspnum")) { pspnum = p.extParam["pspnum"]; } string patient = ""; if (p.extParam.ContainsKey("patient")) { patient = p.extParam["patient"]; } int pageSize = p.rp; //result.table = rm.findRecipeInfo(11, "111"); // result.total = rm.findRecipeTotal(Convert.ToInt32(hospitalId), pspnum, patient,0); result.table = rm.findMatchAndNotCheckRecipeInfo(Convert.ToInt32(hospitalId), pspnum, patient); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 //if (p.sortname.Length > 0 && p.sortorder.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.Sort = (p.sortname + " " + p.sortorder); // result.table = dv.ToTable(); //} ////处理默认查询,即Button1_Click中指定的DefaultSearch查询参数 //if (p.defaultSearch.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.defaultSearch["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含附加参数的话,再来模拟查询,原谅我真的很懒。 //if (p.extParam.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.extParam["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含快速查询参数,则进行快速查询 //if (p.qop != dotNetFlexGrid.SerchParamConfigOperater.None && p.qtype.Length > 0 && p.query.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // if (p.qop == dotNetFlexGrid.SerchParamConfigOperater.Like) // dv.RowFilter = p.qtype + " Like '%" + p.query + "%'"; // else // dv.RowFilter = p.qtype + " = '" + p.query + "'"; // result.table = dv.ToTable(); //} return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridRecipeDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string hospitalId = "0"; if (p.extParam.ContainsKey("hospitalId")) { hospitalId = p.extParam["hospitalId"]; } string pspnum = ""; if (p.extParam.ContainsKey("pspnum")) { pspnum = p.extParam["pspnum"]; } string Status = "0"; if (p.extParam.ContainsKey("printStatus")) { Status = p.extParam["printStatus"]; } result.table = rm.findRecipeInfo(Convert.ToInt32(hospitalId), pspnum, Convert.ToInt32(Status)); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
} //提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string Pspnum = ""; if (p.extParam.ContainsKey("Pspnum")) { Pspnum = p.extParam["Pspnum"]; } string dtbtype = ""; if (p.extParam.ContainsKey("dtbtype")) { dtbtype = p.extParam["dtbtype"]; } string hospitalname = ""; if (p.extParam.ContainsKey("hospitalname")) { hospitalname = p.extParam["hospitalname"]; } string patient = ""; if (p.extParam.ContainsKey("patient")) { patient = p.extParam["patient"]; } string phone = ""; if (p.extParam.ContainsKey("phone")) { phone = p.extParam["phone"]; } string curstate = ""; if (p.extParam.ContainsKey("curstate")) { curstate = p.extParam["curstate"]; } string time = "0"; if (p.extParam.ContainsKey("time")) { time = p.extParam["time"]; } string ftime = "0"; if (p.extParam.ContainsKey("ftime")) { ftime = p.extParam["ftime"]; } result.table = rm.LogisticsInfor(Pspnum, dtbtype, hospitalname, patient, phone, curstate, time, ftime); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 0) { return("产内配送"); } else if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else if (a == 3) { return("中通"); } else if (a == 4) { return("EMS"); } else { return("无"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
} //提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 StorageManageModel rm = new StorageManageModel(); var DrugName = ""; if (p.extParam.ContainsKey("DrugName")) { DrugName = p.extParam["DrugName"]; } string Warehouse = ""; if (p.extParam.ContainsKey("Warehouse")) { Warehouse = p.extParam["Warehouse"]; } //int pageSize = p.rp; // result.table = rm.finInventoryInfor(DrugName, Warehouse); //result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 if (DrugName == "" || DrugName == "0") { DrugName = "0"; } if (Warehouse == "" || Warehouse == "0") { Warehouse = "0"; } result.table = rm.druginventory(DrugName, Warehouse); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { string ActualCapacity = ""; if (dr["ActualCapacity"].ToString() == "0") { return(ActualCapacity = dr["kucun"].ToString()); } else { return(dr["ActualCapacity"].ToString()); } }; dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { if (dr["ActualCapacity"].ToString() == "0") { return("0"); } else { int a = Convert.ToInt32(dr["kucun"].ToString()) - Convert.ToInt32(dr["ActualCapacity"].ToString()); if (a < 0) { a = -a; } return(a.ToString()); } }; //result.FieldFormator.Register("famount", proc6); //result.FieldFormator.Register("iamount", proc5); result.FieldFormator.Register("ActualCapacity", proc3); result.FieldFormator.Register("chazhi", proc4); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 PackingModel rm = new PackingModel(); string Fpactate = "0"; if (p.extParam.ContainsKey("Fpactate")) { Fpactate = p.extParam["Fpactate"]; } string Pacpersonnel = "0"; if (p.extParam.ContainsKey("Pacpersonnel")) { Pacpersonnel = p.extParam["Pacpersonnel"]; } string PacTime = "0"; if (p.extParam.ContainsKey("PacTime")) { PacTime = p.extParam["PacTime"]; } string StartTime = "0"; if (p.extParam.ContainsKey("StartTime")) { StartTime = p.extParam["StartTime"]; } if (PacTime == "") { PacTime = "0"; } if (Pacpersonnel == "") { Pacpersonnel = "0"; } if (StartTime == "") { StartTime = "0"; } dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { if (dr["warningstatus"].ToString() == "1") { return("<span style='color:red'>黄色预警</span>"); } else { return("<span style='color:black'>暂无预警</span>"); } }; result.FieldFormator.Register("warningstatus", proc1); result.table = rm.findPackingInfo(Fpactate, Pacpersonnel, PacTime, StartTime); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["Fpactate"].ToString()); if (bstatus == 1) { return("包装完成"); } else { return("开始包装"); } }; result.FieldFormator.Register("Fpactate", proc2); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 DeliveryModel rm = new DeliveryModel(); string Sendstate = "0"; if (p.extParam.ContainsKey("Sendstate")) { Sendstate = p.extParam["Sendstate"]; } string SendTime = "0"; if (p.extParam.ContainsKey("SendTime")) { SendTime = p.extParam["SendTime"]; } string Sendpersonnel = "0"; if (p.extParam.ContainsKey("Sendpersonnel")) { Sendpersonnel = p.extParam["Sendpersonnel"]; } string hospitalId = "0"; if (p.extParam.ContainsKey("hospitalId")) { hospitalId = p.extParam["hospitalId"]; } string GetDrugTime = "0"; if (p.extParam.ContainsKey("GetDrugTime")) { GetDrugTime = p.extParam["GetDrugTime"]; } if (SendTime == "") { SendTime = "0"; } if (Sendpersonnel == "") { Sendpersonnel = "0"; } if (hospitalId == "") { hospitalId = "0"; } if (GetDrugTime == "") { GetDrugTime = "0"; } dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { if (dr["warningstatus"].ToString() == "1") { return("<span style='color:red'>黄色预警</span>"); } else { return("<span style='color:black'>暂无预警</span>"); } }; result.FieldFormator.Register("warningstatus", proc1); result.table = rm.findDeliveryInfo(Sendstate, SendTime, Sendpersonnel, hospitalId, GetDrugTime); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["Sendstate"].ToString()); if (bstatus == 1) { return("已发货"); } else { return("待发货"); } }; result.FieldFormator.Register("Sendstate", proc2); return(result); }
} //提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 WarehouseInvenModel rm = new WarehouseInvenModel(); string Warehouse = ""; if (p.extParam.ContainsKey("Warehouse")) { Warehouse = p.extParam["Warehouse"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string drugname = ""; if (p.extParam.ContainsKey("drugname")) { drugname = p.extParam["drugname"]; } int pageSize = p.rp; result.table = rm.finWarehouseInvenInfor(Warehouse, STime, ETime, drugname); dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { int a = Convert.ToInt32(dr["InventoryStatus"].ToString()); if (a == 0) { return("安全"); } else { return("不安全"); } }; result.FieldFormator.Register("InventoryStatus", proc); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["StorageCondition"].ToString()); if (a == 0) { return("合格"); } else { return("不合格"); } }; result.FieldFormator.Register("StorageCondition", proc2); result.FieldFormator.Register("InventoryStatus", proc); /* dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) * { * int iamount=0; * int famount = 0; * if (dr["iamount"].ToString() == "") * { * iamount = 0; * } * else * { * iamount = Convert.ToInt32(dr["iamount"].ToString()); * } * * if (dr["famount"].ToString() == "") * { * famount=0; * } * else * { * * famount = Convert.ToInt32(dr["famount"].ToString()); * } * * int c = iamount - famount; * if (c < 0) * { * c = -c; * } * * string cstr = c.ToString(); * * return cstr; * * }; * result.FieldFormator.Register("kucun", proc4); * * */ /* dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) * { * * if (dr["iamount"].ToString() == "") * { * return "0"; * } * else * { * return dr["iamount"].ToString(); * } * * }; * result.FieldFormator.Register("iamount", proc5); * * * dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) * { * * if (dr["famount"].ToString() == "") * { * return "0"; * } * else * { * return dr["famount"].ToString(); * } * * }; * result.FieldFormator.Register("famount", proc6); */ dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["kucun"].ToString()) - Convert.ToInt32(dr["ActualCapacity"].ToString()); if (a < 0) { a = -a; } return(a.ToString()); }; result.FieldFormator.Register("chazhi", proc3); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridRecipeDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); //0,未完成,1已完成,2全部 string status = "0"; if (p.extParam.ContainsKey("status")) { status = p.extParam["status"]; } string date = ""; if (p.extParam.ContainsKey("date")) { date = p.extParam["date"]; } string eName = ""; if (p.extParam.ContainsKey("eName")) { eName = p.extParam["eName"]; } int pageSize = p.rp; //result.table = rm.findRecipeInfo(11, "111"); result.table = rm.findAdjustRecipeInfo(Convert.ToInt32(status), date, eName); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["status"].ToString()); if (bstatus == 1) { return("调剂完成"); } else { return("开始调剂"); } }; result.FieldFormator.Register("status", proc1); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridEmployeeDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 EmployeeModel rm = new EmployeeModel(); string EName = "0"; if (p.extParam.ContainsKey("EName")) { EName = p.extParam["EName"]; } string JobNum = "0"; if (p.extParam.ContainsKey("JobNum")) { JobNum = p.extParam["JobNum"]; } string role = ""; if (p.extParam.ContainsKey("role")) { role = p.extParam["role"]; } if (EName == "0" || EName == "") { EName = "0"; } if (JobNum == "0" || JobNum == "") { JobNum = "0"; } //result.table = rm.findRecipeInfo(11, "111"); // result.table = rm.findPackingInfo(Fpactate, Pacpersonnel, PacTime); result.table = rm.findEmployeeInfo(EName, JobNum, role); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["Sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("Sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["Role"].ToString()); if (a == 0) { return("管理员"); } else if (a == 1) { return("调剂人员"); } else if (a == 2) { return("复核人员"); } else if (a == 3) { return("泡药人员"); } else if (a == 4) { return("煎药人员"); } else if (a == 5) { return("包装人员"); } else if (a == 6) { return("发货人员"); } else if (a == 7) { return("接方人员"); } else if (a == 8) { return("配方人员"); } else if (a == 9) { return("医院登录人员"); } else if (a == 10) { return("医院人员"); } else { return("无"); } }; result.FieldFormator.Register("Role", proc3); /* EmployeeHandler ehandler = new EmployeeHandler(); * result.table = ehandler.SearchEmployee();*/ return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); //处方状态,0全部,1匹配,2未匹配 /* int pageSize = p.rp; * string status = "0"; * if (p.extParam.ContainsKey("status")) * { * status = p.extParam["status"]; * } * string workContent = ""; * if (p.extParam.ContainsKey("workContent")) * { * workContent = p.extParam["workContent"]; * } * string dateStatus = ""; * if (p.extParam.ContainsKey("dateStatus")) * { * dateStatus = p.extParam["dateStatus"]; * } * * pageSize = 1; * if (status.Equals("1")) * { * result.table = rm.findMatchRecipeInfo("", "", "", p.page, pageSize); * result.total = rm.findMatchRecipeTotal("", "", ""); * } * else if (status.Equals("2")) * { * result.table = rm.findNotMatchRecipeInfo("", "", "", p.page, pageSize); * result.total = rm.findNotMatchRecipeTotal("", "", ""); * } * else * { * result.table = rm.findAllRecipeInfo(p.page, pageSize); * result.total = rm.findAllRecipeTotal(); * * }*/ string Employeenum = ""; if (p.extParam.ContainsKey("Employeenum")) { Employeenum = p.extParam["Employeenum"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string RecipeStatus = ""; if (p.extParam.ContainsKey("RecipeStatus")) { RecipeStatus = p.extParam["RecipeStatus"]; } string Psnum = ""; if (p.extParam.ContainsKey("Psnum")) { Psnum = p.extParam["Psnum"]; } string JTime = System.DateTime.Now.ToString("yyyy-MM-dd"); if (p.extParam.ContainsKey("JTime")) { JTime = p.extParam["JTime"]; } int pageSize = p.rp; result.table = rm.searchInfo(Employeenum, STime, ETime, RecipeStatus, Psnum, JTime); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
//提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string hospitalID = ""; if (p.extParam.ContainsKey("hospitalID")) { hospitalID = p.extParam["hospitalID"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string dtbcompany = "0"; if (p.extParam.ContainsKey("dtbcompany")) { dtbcompany = p.extParam["dtbcompany"]; } if (dtbcompany == "无") { dtbcompany = ""; } dotNetFlexGrid.FieldFormatorHandle proc91 = delegate(DataRow dr) { string z = ""; if (dr["dtbcompany"].ToString() == "") { String az = dr["dtbcompany"].ToString(); az = "3"; if (az == "3") { z = "无"; } } else { String az = dr["dtbcompany"].ToString(); z = az; } return(z); }; result.FieldFormator.Register("dtbcompany", proc91); //int pageSize = p.rp; result.table = rm.finDistributInfo(hospitalID, STime, ETime, dtbcompany); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 string tisaneid = "0"; if (p.extParam.ContainsKey("tisaneid")) { tisaneid = p.extParam["tisaneid"]; } string tisaneman = "0"; if (p.extParam.ContainsKey("tisaneman")) { tisaneman = p.extParam["tisaneman"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string tisanestatus = "0"; if (p.extParam.ContainsKey("tisanestatus")) { tisanestatus = p.extParam["tisanestatus"]; } string tisanemethod = "0"; if (p.extParam.ContainsKey("tisanemethod")) { tisanemethod = p.extParam["tisanemethod"]; } if (tisaneid == "") { tisaneid = "0"; } if (tisaneman == "") { tisaneman = "0"; } TeModel tm = new TeModel(); // result.table = tm.queryTisaneInfo(Convert.ToInt32(tisaneid), tisaneman, tisanestatus, tisanemethod, tisanetime); result.table = tm.queryTisaneInfo(Convert.ToInt32(tisaneid), tisaneman, Convert.ToInt32(tisanestatus), Convert.ToInt32(tisanemethod), STime, ETime); dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { string a = ""; int tstatus = Convert.ToInt32(dr["tisanestatus"].ToString()); if (tstatus == 0) { a = "开始煎药"; } else if (tstatus == 1) { a = "煎药完成"; } return(a); }; result.FieldFormator.Register("tisanestatus", proc); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["bubblestatus"].ToString()); if (bstatus == 1) { return("泡药完成"); } else { return("开始泡药"); } }; // dotNetFlexGrid.FieldFormatorHandle proc1a = delegate(DataRow dr) { string z = ""; int bstatus = Convert.ToInt32(dr["tisanestatus"].ToString()); string start = dr["starttime"].ToString(); if (bstatus == 0) { System.DateTime currentTime = new System.DateTime(); currentTime = System.DateTime.Now; string strtime = currentTime.ToString("yyyy-MM-dd HH:mm:ss"); // DateTime d1 = Convert.ToDateTime(strtime); //当前时间 DateTime d2 = Convert.ToDateTime(start); //开始时间 TimeSpan d3 = d1.Subtract(d2); //泡药时间 int dT = Convert.ToInt32(d3.Days.ToString()) * 24 * 60 + Convert.ToInt32(d3.Hours.ToString()) * 60 + Convert.ToInt32(d3.Minutes.ToString()); //转化为分钟数 string dt = dT.ToString(); z = dt; } else { z = dr["tisanetime"].ToString(); } return(z); }; result.FieldFormator.Register("tisanetime", proc1a); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
//提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string Pspnum = ""; if (p.extParam.ContainsKey("Pspnum")) { Pspnum = p.extParam["Pspnum"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string HandleStatus = ""; if (p.extParam.ContainsKey("HandleStatus")) { HandleStatus = p.extParam["HandleStatus"]; } string EarlyWarning = ""; if (p.extParam.ContainsKey("EarlyWarning")) { EarlyWarning = p.extParam["EarlyWarning"]; } string hospitalId = "0"; if (p.extParam.ContainsKey("hospitalId")) { hospitalId = p.extParam["hospitalId"]; } if (Pspnum == "" || Pspnum == "0") { Pspnum = "0"; } if (STime == "" || STime == "0") { STime = "0"; } if (ETime == "" || ETime == "0") { ETime = "0"; } if (EarlyWarning == "" || EarlyWarning == "0") { EarlyWarning = "0"; } if (hospitalId == "" || hospitalId == "0") { hospitalId = "0"; } if (HandleStatus == "" || HandleStatus == "0") { HandleStatus = "0"; } result.table = rm.WarningInfo(Convert.ToInt32(hospitalId), Pspnum, STime, ETime, HandleStatus, EarlyWarning); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); result.table = rm.WarningInfo(Convert.ToInt32(hospitalId), Pspnum, STime, ETime, HandleStatus, EarlyWarning); dotNetFlexGrid.FieldFormatorHandle errortimeDelegate = delegate(DataRow dr) { string str = dr["errortime"].ToString(); if ("1970/1/1 0:00:00".Equals(str)) { return(""); } else { return(str); } }; result.FieldFormator.Register("errortime", errortimeDelegate); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); dotNetFlexGrid.FieldFormatorHandle proc7 = delegate(DataRow dr) { string errortype = dr["errortype"].ToString(); string doneresult = dr["doneresult"].ToString(); if (errortype == "调剂警告" && (doneresult != "")) { return("进入调剂阶段"); } else if (errortype == "审核警告" && (doneresult == "2")) { return("审核完成"); } else if (errortype == "审核警告" && (doneresult != "")) { return("进入审核阶段"); } else if (errortype == "复核警告" && (doneresult != "")) { return("进入复核阶段"); } else if (errortype == "泡药警告" && (doneresult != "")) { return("进入泡药阶段"); } else if (errortype == "煎药警告" && (doneresult != "")) { return("进入煎药阶段"); } else if (errortype == "包装警告" && (doneresult != "")) { return("进入包装阶段"); } else if (errortype == "发货警告" && (doneresult != "")) { return("进入发货阶段"); } else { return(""); } }; result.FieldFormator.Register("doneresult", proc7); dotNetFlexGrid.FieldFormatorHandle proc8 = delegate(DataRow dr) { string errortype = dr["errortype"].ToString(); string doneresult = dr["doneresult"].ToString(); if (errortype == "审核警告" && (doneresult == "2")) { return("审核异常"); } return(errortype); }; result.FieldFormator.Register("errortype", proc8); return(result); }
//表1方法 public dotNetFlexGrid.DataHandlerResult FlexGridRecipeDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 RecipeModel rm = new RecipeModel(); result.table = rm.findRecipeInfo(); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
} //提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string per = ""; if (p.extParam.ContainsKey("per")) { per = p.extParam["per"]; } string STime = ""; if (p.extParam.ContainsKey("STime")) { STime = p.extParam["STime"]; } string ETime = ""; if (p.extParam.ContainsKey("ETime")) { ETime = p.extParam["ETime"]; } string hospitalId = "0"; if (p.extParam.ContainsKey("hospitalId")) { hospitalId = p.extParam["hospitalId"]; } result.table = rm.OrderListInfo(per, STime, ETime, Convert.ToInt32(hospitalId)); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { string z = ""; if (dr["st"].ToString() == "") { String az = dr["st"].ToString(); az = "3"; if (az == "3") { z = "无"; } } else { int a = Convert.ToInt32(dr["st"].ToString()); if (a == 1) { z = "已结算"; } else { z = "未结算"; } } return(z); }; result.FieldFormator.Register("st", proc6); dotNetFlexGrid.FieldFormatorHandle proca2 = delegate(DataRow dr) { string z = ""; if (dr["printstatus"].ToString() == "") { String az = dr["printstatus"].ToString(); az = "3"; if (az == "3") { z = "无"; } } else { int az = Convert.ToInt32(dr["printstatus"].ToString()); if (az == 1) { z = "已打印"; } if (az == 0) { z = "未打印"; } } return(z); }; result.FieldFormator.Register("printstatus", proca2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc61 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc61); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridFlexGridDrugDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 DrugModel dm = new DrugModel(); string pspnum = "0"; string hospitalId = ""; // if (p.extParam.ContainsKey("drugpspnum")) // { // pspnum = p.extParam["drugpspnum"]; // } // if (p.extParam.ContainsKey("hospitalId")) // { // hospitalId = p.extParam["hospitalId"]; // } string pid = ""; if (p.extParam.ContainsKey("pid")) { pid = p.extParam["pid"]; } // result.table = dm.findDrugByPspnum(pspnum, hospitalId); result.table = dm.findDrugByPspnum(pid); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { string drugname1 = ""; string drugname2 = ""; RecipeModel rm = new RecipeModel(); DataTable dt = rm.findspecialdrug2(); string z = "<span style='color:black'>" + dr["Drugname"].ToString() + "</span>"; for (int i = 0; i < dt.Rows.Count; i++) { drugname1 = dt.Rows[i][2].ToString(); drugname2 = dt.Rows[i][3].ToString(); SqlDataReader sdr = rm.finddrugnamebypid(pid, drugname1); SqlDataReader sdr2 = rm.finddrugnamebypid(pid, drugname2); if (sdr.Read() && sdr2.Read()) { // z = "<span style='color:red'>"+dr["Drugname"].ToString()+"</span>"; if (dr["Drugname"].ToString() == drugname1 || dr["Drugname"].ToString() == drugname2) { z = "<span style='color:red'>" + dr["Drugname"].ToString() + "</span>"; } break; } else { z = "<span style='color:black'>" + dr["Drugname"].ToString() + "</span>"; } } return(z); }; result.FieldFormator.Register("Drugname", proc1); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { string z = ""; string drugname = dr["Drugname"].ToString(); RecipeModel rm = new RecipeModel(); SqlDataReader sdr = rm.findspecialdrug(drugname); if (sdr.Read()) { if (sdr["type"].ToString() == "先煎药") { z = "<span style='color:red'>先煎</span>"; } if (sdr["type"].ToString() == "后下") { z = "<span style='color:red'>后下</span>"; } if (sdr["type"].ToString() == "另煎药") { z = "<span style='color:red'>另煎药</span>"; } if (sdr["type"].ToString() == "冲服") { z = "<span style='color:red'>冲服</span>"; } if (sdr["type"].ToString() == "烊化药") { z = "<span style='color:red'>烊化药</span>"; } if (sdr["type"].ToString() == "禁用药") { z = "<span style='color:red'>(妊娠禁忌)禁用药</span>"; } if (sdr["type"].ToString() == "慎用药") { z = "<span style='color:red'>(妊娠禁忌)慎用药</span>"; } } else { z = "<span style='color:black'>" + dr["DrugDescription"].ToString() + "</span>"; } //dt.Rows[0]["hospitalid"].ToString(); // string z = ""; // for (int i = 0; i < dt.Rows.Count; i++) // { // string specialdrugname = dt.Rows[i][2].ToString(); // string specialtype = dt.Rows[i][1].ToString(); // if (drugname == specialdrugname) // { // if (specialtype == "十八反" || specialtype == "十九畏" || specialtype == "禁用药" || specialtype == "慎用药") // { // z = "<span style='color:red'>" + drugname + "</span>"; // break; // } // if (specialtype == "先煎药" || specialtype == "后下" || specialtype == "另煎药" || specialtype == "冲服" || specialtype == "烊化药") // { // z = "<span style='color:red'>" + drugname + "</span>"; // break; // } // } // else // { // } // } // z = "<span style='color:black'>" + drugname + "</span>"; return(z); }; result.FieldFormator.Register("DrugDescription", proc5); // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 //如果传递的参数包含排序设置的话 ,通过DataView.Sort功能模拟进行当页排序 //if (p.sortname.Length > 0 && p.sortorder.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.Sort = (p.sortname + " " + p.sortorder); // result.table = dv.ToTable(); //} ////处理默认查询,即Button1_Click中指定的DefaultSearch查询参数 //if (p.defaultSearch.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.defaultSearch["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含附加参数的话,再来模拟查询,原谅我真的很懒。 //if (p.extParam.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.extParam["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含快速查询参数,则进行快速查询 //if (p.qop != dotNetFlexGrid.SerchParamConfigOperater.None && p.qtype.Length > 0 && p.query.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // if (p.qop == dotNetFlexGrid.SerchParamConfigOperater.Like) // dv.RowFilter = p.qtype + " Like '%" + p.query + "%'"; // else // dv.RowFilter = p.qtype + " = '" + p.query + "'"; // result.table = dv.ToTable(); //} return(result); }
//提供数据的方法 public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 string pspstatus = "0"; if (p.extParam.ContainsKey("pspstatus")) { pspstatus = p.extParam["pspstatus"]; } if (pspstatus == "") { pspstatus = "0"; } string StartTime = "0"; if (p.extParam.ContainsKey("StartTime")) { StartTime = p.extParam["StartTime"]; } if (StartTime == "") { StartTime = "0"; } string EndTime = "0"; if (p.extParam.ContainsKey("EndTime")) { EndTime = p.extParam["EndTime"]; } if (EndTime == "") { EndTime = "0"; } string employcode = "0"; if (p.extParam.ContainsKey("employcode")) { employcode = p.extParam["employcode"]; } if (employcode == "") { employcode = "0"; } string qualityman = "0"; if (p.extParam.ContainsKey("qualityman")) { qualityman = p.extParam["qualityman"]; } if (qualityman == "") { qualityman = "0"; } RecipeModel rm = new RecipeModel(); result.table = rm.findqualitycheckinfo(pspstatus, StartTime, EndTime, qualityman); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { int ischeck = Convert.ToInt32(dr["ischeck"].ToString()); if (ischeck == 1) { return("合格"); } else { return("不合格"); } }; result.FieldFormator.Register("ischeck", proc1); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridRecipeDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 string tisaneid = "0"; if (p.extParam.ContainsKey("tisaneid")) { tisaneid = p.extParam["tisaneid"]; } if (tisaneid == "") { tisaneid = "0"; } TeModel tm = new TeModel(); result.table = tm.getPreBytisaneid(Convert.ToInt32(tisaneid)); dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) { string a = ""; int tstatus = Convert.ToInt32(dr["tisanestatus"].ToString()); if (tstatus == 0) { a = "开始煎药"; } else if (tstatus == 1) { a = "煎药完成"; } /* else * { * a = "煎药"; * }*/ return(a); }; result.FieldFormator.Register("tisanestatus", proc); //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 //if (p.sortname.Length > 0 && p.sortorder.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.Sort = (p.sortname + " " + p.sortorder); // result.table = dv.ToTable(); //} ////处理默认查询,即Button1_Click中指定的DefaultSearch查询参数 //if (p.defaultSearch.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.defaultSearch["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含附加参数的话,再来模拟查询,原谅我真的很懒。 //if (p.extParam.ContainsKey("String1")) //{ // System.Data.DataView dv = result.table.DefaultView; // dv.RowFilter = "String1 Like '%" + p.extParam["String1"] + "%'"; // result.table = dv.ToTable(); //} ////如果传递的参数包含快速查询参数,则进行快速查询 //if (p.qop != dotNetFlexGrid.SerchParamConfigOperater.None && p.qtype.Length > 0 && p.query.Length > 0) //{ // System.Data.DataView dv = result.table.DefaultView; // if (p.qop == dotNetFlexGrid.SerchParamConfigOperater.Like) // dv.RowFilter = p.qtype + " Like '%" + p.query + "%'"; // else // dv.RowFilter = p.qtype + " = '" + p.query + "'"; // result.table = dv.ToTable(); //} dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 // result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 //如果传递的参数包含排序设置的话,通过DataView.Sort功能模拟进行当页排序 string bubbleman = "0"; if (p.extParam.ContainsKey("bubbleman")) { bubbleman = p.extParam["bubbleman"]; } string bubblestatus = "0"; if (p.extParam.ContainsKey("bubblestatus")) { bubblestatus = p.extParam["bubblestatus"]; } if (bubbleman == "") { bubbleman = "0"; } Bubbleinfo bi = new Bubbleinfo(); result.table = bi.getBubbleInfo(bubbleman, Convert.ToInt32(bubblestatus)); dotNetFlexGrid.FieldFormatorHandle proc1 = delegate(DataRow dr) { int bstatus = Convert.ToInt32(dr["bubblestatus"].ToString()); if (bstatus == 1) { return("泡药完成"); } else { return("开始泡药"); } }; dotNetFlexGrid.FieldFormatorHandle proc1a = delegate(DataRow dr) { string z = ""; int bstatus = Convert.ToInt32(dr["bubblestatus"].ToString()); string start = dr["starttime"].ToString(); int soaktime = Convert.ToInt32(dr["soaktime"].ToString()); if (bstatus == 0) { System.DateTime currentTime = new System.DateTime(); currentTime = System.DateTime.Now; string strtime = currentTime.ToString("yyyy-MM-dd HH:mm:ss"); // DateTime d1 = Convert.ToDateTime(strtime); //当前时间 DateTime d2 = Convert.ToDateTime(start); //开始时间 TimeSpan d3 = d1.Subtract(d2); //泡药时间 int dT = Convert.ToInt32(d3.Days.ToString()) * 24 * 60 + Convert.ToInt32(d3.Hours.ToString()) * 60 + Convert.ToInt32(d3.Minutes.ToString()); //转化为分钟数 string dt = dT.ToString(); if (dT > soaktime) { z = "<span style='color:red'>" + dt + "</span>"; } else { z = "<span style='color:black'>" + dt + "</span>"; } } else { int d = Convert.ToInt32(dr["doingtime"].ToString()); if (d > soaktime) { z = "<span style='color:red'>" + dr["doingtime"].ToString() + "</span>"; } else { z = "<span style='color:black'>" + dr["doingtime"].ToString() + "</span>"; } } return(z); }; /* dotNetFlexGrid.FieldFormatorHandle proc = delegate(DataRow dr) * { * string a = ""; * int doingtime = Convert.ToInt32(dr["doingtime"].ToString()); * int soaktime = Convert.ToInt32(dr["soaktime"].ToString()); * * if (doingtime > soaktime) * { * a = "<span style='color:red'>" + dr["doingtime"].ToString() + "</span>"; * * } * else { * * a = "<span style='color:black'>" + dr["doingtime"].ToString() + "</span>"; * } * * * return a; * * }; */ result.FieldFormator.Register("bubblestatus", proc1); result.FieldFormator.Register("doingtime", proc1a); // result.FieldFormator.Register("doingtime", proc); // result.FieldFormator.Register("warningstatus", proc1); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }
public dotNetFlexGrid.DataHandlerResult FlexGridClearingpartyDataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 string EName = "0"; if (p.extParam.ContainsKey("EName")) { EName = p.extParam["EName"]; } if (EName == "0" || EName == "") { EName = "0"; } EmployeeHandler eh = new EmployeeHandler(); result.table = eh.employeelimits(EName); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["role"].ToString()); if (a == 0) { return("管理员"); } else if (a == 1) { return("调剂人员"); } else if (a == 2) { return("复核人员"); } else if (a == 3) { return("泡药人员"); } else if (a == 4) { return("煎药人员"); } else if (a == 5) { return("包装人员"); } else if (a == 6) { return("发货人员"); } else if (a == 7) { return("接方人员"); } else if (a == 8) { return("配方人员"); } else if (a == 9) { return("医院人员"); } else if (a == 10) { return("医院登录人员"); } else { return("无"); } }; result.FieldFormator.Register("role", proc3); //result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据 return(result); }
public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 RecipeModel rm = new RecipeModel(); string StartTime = ""; if (p.extParam.ContainsKey("StartTime")) { StartTime = p.extParam["StartTime"]; } string EndTime = ""; if (p.extParam.ContainsKey("EndTime")) { EndTime = p.extParam["EndTime"]; } string PNum = ""; if (p.extParam.ContainsKey("PNum")) { PNum = p.extParam["PNum"]; } string AuditPer = ""; if (p.extParam.ContainsKey("AuditPer")) { AuditPer = p.extParam["AuditPer"]; } result.table = rm.findWorkRQfo(StartTime, EndTime, AuditPer, PNum); dotNetFlexGrid.FieldFormatorHandle proc2 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["sex"].ToString()); if (a == 1) { return("男"); } else { return("女"); } }; result.FieldFormator.Register("sex", proc2); dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr) { int b = Convert.ToInt32(dr["decscheme"].ToString()); if (b == 1) { return("微压(密闭)解表(15min)"); } else if (b == 2) { return("微压(密闭)汤药(15min)"); } else if (b == 3) { return("微压(密闭)补药(15min)"); } else if (b == 4) { return("常压解表(10min,10min)"); } else if (b == 5) { return("常压汤药(20min,15min)"); } else if (b == 6) { return("常压补药(25min,20min)"); } else if (b == 20) { return("先煎解表(10min,10min,10min)"); } else if (b == 21) { return("先煎汤药(10min,20min,15min)"); } else if (b == 22) { return("先煎补药(10min,25min,20min)"); } else if (b == 36) { return("后下解表(10min(3:7),10min)"); } else if (b == 37) { return("后下汤药(20min(13:7),15min)"); } else if (b == 38) { return("后下补药(25min(18:7),20min)"); } else if (b == 81) { return("微压自定义"); } else if (b == 82) { return("常压自定义"); } else if (b == 83) { return("先煎自定义"); } else { return("后下自定义"); } }; result.FieldFormator.Register("decscheme", proc3); dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["decmothed"].ToString()); if (a == 1) { return("先煎"); } else if (a == 2) { return("后下"); } else { return("加糖加蜜"); } }; result.FieldFormator.Register("decmothed", proc4); dotNetFlexGrid.FieldFormatorHandle proc6 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["takeway"].ToString()); if (a == 1) { return("水煎餐后"); } else { return(""); } }; result.FieldFormator.Register("takeway", proc6); dotNetFlexGrid.FieldFormatorHandle proc5 = delegate(DataRow dr) { int a = Convert.ToInt32(dr["dtbtype"].ToString()); if (a == 1) { return("顺丰"); } else if (a == 2) { return("圆通"); } else { return("中通"); } }; result.FieldFormator.Register("dtbtype", proc5); return(result); }