示例#1
0
        public static bool InsertAccessXCG(UpLoadDataForXCG obj, out string err)
        {
            err = "";
            bool flag = false;

            try
            {
                string sql = string.Format(@"insert into zkhw_tj_xcg(bar_code,WBC,RBC,PCT,PLT,HGB,HCT,MCV,MCH,MCHC,RDWCV,RDWSD,
                                             MONO,MONOP,GRAN,GRANP,NEUT,NEUTP,EO,EOP,BASO,BASOP,LYM,
                                            LYMP,MPV,PDW,MXD,MXDP,PLCR,OTHERS,createtime)values('{0}','{1}','{2}','{3}','{4}'
                                            ,'{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}'
                                            ,'{20}','{21}','{22}','{23}','{24}','{25}','{26}','{27}','{28}','{29}','{30}')",
                                           obj.bar_code, obj.WBC, obj.RBC, obj.PCT, obj.PLT, obj.HGB, obj.HCT, obj.MCV, obj.MCH, obj.MCHC,
                                           obj.RDW_CV, obj.RDW_SD, obj.MONO, obj.MONOP, obj.GRAN, obj.GRANP, obj.NEUT, obj.NEUTP, obj.EO, obj.EOP,
                                           obj.BASO, obj.BASOP, obj.LYM, obj.LYMP, obj.MPV, obj.PDW, obj.MXD, obj.MXDP, obj.PLCR,
                                           obj.OTHERS, obj.createtime);
                int ret = DbHelperAccess.ExecuteSql(sql);
                if (ret > 0)
                {
                    flag = true;
                }
            }
            catch (Exception e)
            {
                err = e.Message;
            }
            return(flag);
        }
示例#2
0
        public static bool UpLoadDataxcgDal(UpLoadDataForXCG obj, out string err)
        {
            err = "";
            bool flag = false;

            try
            {
                string id             = Common.GetNewId();
                string timeCodeUnique = obj.bar_code + "_" + obj.createtime;
                string sql0           = string.Format("select count(ID) from zkhw_temp_xcg where timecodeUnique='{0}'", timeCodeUnique);
                object o        = DbHelperMySQL.GetSingleYpt(sql0);
                bool   isinsert = false;
                if (o == null)
                {
                    isinsert = true;
                }
                else
                {
                    if (int.Parse(o.ToString()) <= 0)
                    {
                        isinsert = true;
                    }
                }
                string sql = "";
                if (isinsert == true)
                {
                    sql = string.Format(@"insert into zkhw_temp_xcg(ID,bar_code,WBC,RBC,PCT,PLT,HGB,HCT,MCV,MCH,MCHC,RDWCV,RDWSD,
                                             MONO,MONOP,GRAN,GRANP,NEUT,NEUTP,EO,EOP,BASO,BASOP,LYM,
                                            LYMP,MPV,PDW,MXD,MXDP,PLCR,OTHERS,createtime,status,timecodeUnique)values('{0}','{1}','{2}','{3}','{4}'
                                            ,'{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}'
                                            ,'{20}','{21}','{22}','{23}','{24}','{25}','{26}','{27}','{28}','{29}','{30}','{31}',0,'{32}')",
                                        id, obj.bar_code, obj.WBC, obj.RBC, obj.PCT, obj.PLT, obj.HGB, obj.HCT, obj.MCV, obj.MCH, obj.MCHC,
                                        obj.RDW_CV, obj.RDW_SD, obj.MONO, obj.MONOP, obj.GRAN, obj.GRANP, obj.NEUT, obj.NEUTP, obj.EO, obj.EOP,
                                        obj.BASO, obj.BASOP, obj.LYM, obj.LYMP, obj.MPV, obj.PDW, obj.MXD, obj.MXDP, obj.PLCR,
                                        obj.OTHERS, obj.createtime, timeCodeUnique);
                }
                else
                {
                    sql = @"update zkhw_temp_xcg set status=0, HCT='" + obj.HCT + "',HGB='" + obj.HGB + "',LYM='" + obj.LYM +
                          "',LYMP='" + obj.LYMP + "',MCH='" + obj.MCH + "',MCHC='" + obj.MCHC + "',MCV='" + obj.MCV +
                          "',MPV='" + obj.MPV + "',MXD='" + obj.MXD + "',MXDP='" + obj.MXDP + "',NEUT='" + obj.NEUT +
                          "',NEUTP='" + obj.NEUTP + "',PCT='" + obj.PCT + "',PDW='" + obj.PDW + "',PLT='" + obj.PLT +
                          "',RBC='" + obj.RBC + "',RDWCV='" + obj.RDW_CV + "',RDWSD='" + obj.RDW_SD + "',WBC='" + obj.WBC +
                          "',MONO='" + obj.MONO + "',MONOP='" + obj.MONOP + "',GRAN='" + obj.GRAN + "',GRANP='" + obj.GRANP +
                          "',PLCR='" + obj.PLCR + "' where timecodeUnique = '" + timeCodeUnique + "'";
                }
                int ret = DbHelperMySQL.ExecuteSqlYpt(sql);
                if (ret > 0)
                {
                    flag = true;
                }
            }
            catch (Exception e)
            {
                err = e.Message;
            }
            return(flag);
        }
示例#3
0
        public static DisplayData GetobjDisplayXCG(UpLoadDataForXCG a)
        {
            a.RDWSD = a.RDW_SD;
            a.RDWCV = a.RDW_CV;
            DisplayData obj = new DisplayData();

            obj.BarCode    = a.bar_code;
            obj.UploadDate = a.createtime;
            obj.Type       = "血常规";
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(@"WBC:{0},RBC:{1},PCT:{2},PLT:{3},HGB:{4},HCT:{5},MCV:{6},MCH:{7},MCHC:{8},RDWCV:{9},RDWSD:{10}",
                            a.WBC, a.RBC, a.PCT, a.PLT, a.HGB, a.HCT, a.MCV, a.MCH, a.MCHC, a.RDWCV, a.RDWSD);
            sb.AppendFormat(@",MONO:{0},MONOP:{1},GRAN:{2},GRANP:{3},NEUT:{4},NEUTP:{5},EO:{6},EOP:{7},BASO:{8},BASOP:{9},LYM:{10}",
                            a.MONO, a.MONOP, a.GRAN, a.GRANP, a.NEUT, a.NEUTP, a.EO, a.EOP, a.BASO, a.BASOP, a.LYM);
            sb.AppendFormat(@",LYMP:{0},MPV:{1},PDW:{2},MXD:{3},MXDP:{4},PLCR:{5},OTHERS:{6}", a.LYMP, a.MPV, a.PDW, a.MXD, a.MXDP, a.PLCR, a.OTHERS);
            obj.Content = sb.ToString();
            return(obj);
        }
示例#4
0
        public static UpLoadDataForXCG GetObjxcgByDR(DataRow dr)
        {
            UpLoadDataForXCG obj = new UpLoadDataForXCG();

            if (dr["ID"] != null)
            {
                obj.ID = dr["ID"].ToString();
            }
            if (dr["bar_code"] != null)
            {
                obj.bar_code = dr["bar_code"].ToString();
            }
            if (dr["WBC"] != null)
            {
                obj.WBC = dr["WBC"].ToString();
            }
            if (dr["RBC"] != null)
            {
                obj.RBC = dr["RBC"].ToString();
            }
            if (dr["PCT"] != null)
            {
                obj.PCT = dr["PCT"].ToString();
            }
            if (dr["PLT"] != null)
            {
                obj.PLT = dr["PLT"].ToString();
            }
            if (dr["HGB"] != null)
            {
                obj.HGB = dr["HGB"].ToString();
            }
            if (dr["HCT"] != null)
            {
                obj.HCT = dr["HCT"].ToString();
            }
            if (dr["MCV"] != null)
            {
                obj.MCV = dr["MCV"].ToString();
            }
            if (dr["MCH"] != null)
            {
                obj.MCH = dr["MCH"].ToString();
            }
            if (dr["MCHC"] != null)
            {
                obj.MCHC = dr["MCHC"].ToString();
            }
            if (dr["RDWCV"] != null)
            {
                obj.RDWCV  = dr["RDWCV"].ToString();
                obj.RDW_CV = obj.RDWCV;
            }
            if (dr["RDWSD"] != null)
            {
                obj.RDWSD  = dr["RDWSD"].ToString();
                obj.RDW_SD = obj.RDWSD;
            }
            if (dr["MONO"] != null)
            {
                obj.MONO = dr["MONO"].ToString();
            }
            if (dr["MONOP"] != null)
            {
                obj.MONOP = dr["MONOP"].ToString();
            }
            if (dr["GRAN"] != null)
            {
                obj.GRAN = dr["GRAN"].ToString();
            }
            if (dr["GRANP"] != null)
            {
                obj.GRANP = dr["GRANP"].ToString();
            }
            if (dr["NEUT"] != null)
            {
                obj.NEUT = dr["NEUT"].ToString();
            }
            if (dr["NEUTP"] != null)
            {
                obj.NEUTP = dr["NEUTP"].ToString();
            }
            if (dr["EO"] != null)
            {
                obj.EO = dr["EO"].ToString();
            }
            if (dr["EOP"] != null)
            {
                obj.EOP = dr["EOP"].ToString();
            }
            if (dr["BASO"] != null)
            {
                obj.BASO = dr["BASO"].ToString();
            }
            if (dr["BASOP"] != null)
            {
                obj.BASOP = dr["BASOP"].ToString();
            }
            if (dr["LYM"] != null)
            {
                obj.LYM = dr["LYM"].ToString();
            }
            if (dr["LYMP"] != null)
            {
                obj.LYMP = dr["LYMP"].ToString();
            }
            if (dr["MPV"] != null)
            {
                obj.MPV = dr["MPV"].ToString();
            }
            if (dr["PDW"] != null)
            {
                obj.PDW = dr["PDW"].ToString();
            }
            if (dr["MXD"] != null)
            {
                obj.MXD = dr["MXD"].ToString();
            }
            if (dr["MXDP"] != null)
            {
                obj.MXDP = dr["MXDP"].ToString();
            }
            if (dr["PLCR"] != null)
            {
                obj.PLCR = dr["PLCR"].ToString();
            }
            if (dr["OTHERS"] != null)
            {
                obj.OTHERS = dr["OTHERS"].ToString();
            }
            if (dr["createtime"] != null)
            {
                obj.createtime = dr["createtime"].ToString();
            }
            return(obj);
        }