Esempio n. 1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     PEEBIEntity PEEBIEntity = new PEEBIEntity();
     PEEBIEntity.PEEBIBD = DateTime.Parse(txtPEEBIBD.Text);
     PEEBIEntity.PEEBICP = txtPEEBICP.Text;
     PEEBIEntity.PEEBIDEP = txtPEEBIDEP.Text;
     PEEBIEntity.PEEBIDL = txtPEEBIDL.Text;
     PEEBIEntity.PEEBIDT = dpPEEBIDT.SelectedItem.Text;
     PEEBIEntity.PEEBIEC = txtPEEBIEC.Text;
     PEEBIEntity.PEEBIED = DateTime.Parse(txtPEEBIED.Text);
     PEEBIEntity.PEEBIEN = txtPEEBIEN.Text;
     PEEBIEntity.PEEBIES = dpPEEBIES.SelectedItem.Value;
     PEEBIEntity.PEEBIPC = txtPEEBIPC.Text;
     string szResult = DbHelper.GetInstance().UpdatePEEBI(PEEBIEntity);
 }
Esempio n. 2
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     PEEBIEntity  PEEBIEntity = new PEEBIEntity();
     PEEBIEntity.PEEBIBD = DateTime.Parse(txtPEEBIBD.Text) ;
     PEEBIEntity.PEEBICP = txtPEEBICP.Text;
     PEEBIEntity.PEEBIDEP = txtPEEBIDEP.Text;
     PEEBIEntity.PEEBIDL = txtPEEBIDL.Text;
     PEEBIEntity.PEEBIDT = dpPEEBIDT.SelectedItem.Text;
     PEEBIEntity.PEEBIEC = txtPEEBIEC.Text;
     PEEBIEntity.PEEBIED = DateTime.Parse(txtPEEBIED.Text);
     PEEBIEntity.PEEBIEN = txtPEEBIEN.Text ;
     PEEBIEntity.PEEBIES = dpPEEBIES.SelectedItem.Value;
     PEEBIEntity.PEEBIPC = txtPEEBIPC.Text;
     PEEBIEntity.PEEBIID = userEntity.UserSerialID;
     string szResult= DbHelper.GetInstance().AddPEEBI(PEEBIEntity);
     szResult = DbHelper.GetInstance().AddPEEBITEMP(PEEBIEntity.PEEBIEC);
 }
Esempio n. 3
0
        /// <summary>
        /// 新增信息
        /// </summary>
        /// <param name="_PEEBIEntity"></param>
        /// <returns>返回string "-1"表示该已经存在,否则成功 </returns>
        public string AddPEEBI(PEEBIEntity _PEEBIEntity)
        {
            //判断该记录是否已经存在
            DbParameter[] prams = {    MakeInParam("@PEEBIEC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEC ),
                                     };
            string sql = "select * from PEEBI where PEEBIEC=@PEEBIEC";
            if (ExecuteDataset(CommandType.Text, sql, prams).Tables[0].Rows.Count > 0)
            {
                return "-1";//该记录已经存在
            }
            else
            {
                //if (_PEEBIEntity.PEEBIEP == null)
                //{
                //    _PEEBIEntity.PEEBIEPHORN = "无";
                //}
                //else if (_PEEBIEntity.PEEBIEP.Length == 0)
                //{
                //    _PEEBIEntity.PEEBIEPHORN = "无";
                //}
               //add RIo  _PEEBIEntity.PEEBIEC = px_Sequence("PEEBICODE", "1");
                DbParameter[] pramsInsert = {
                                       //MakeInParam("@PEEBIEPHORN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEPHORN ),
                                       MakeInParam("@PEEBIEC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEC ),
                                       MakeInParam("@PEEBIEN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEN ),
                                       //MakeInParam("@PEEBIEEN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEEN ),
                                       //MakeInParam("@PEEBIETWN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIETWN ),
                                       //MakeInParam("@PEEBIEG",(DbType)SqlDbType.Char,1,_PEEBIEntity.PEEBIEG ),
                                       MakeInParam("@PEEBIBD",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIBD ),
                                       //MakeInParam("@PEEBIEA",(DbType)SqlDbType.Int,4,_PEEBIEntity.PEEBIEA ),
                                       MakeInParam("@PEEBIDEP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDEP ),
                                       MakeInParam("@PEEBIDT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDT ),
                                       MakeInParam("@PEEBIPC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIPC ),
                                       //MakeInParam("@PEEBIWT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIWT ),
                                       //MakeInParam("@PEEBIPT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIPT ),
                                       //MakeInParam("@PBPOCCC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBPOCCC ),
                                       //MakeInParam("@PEEBIWP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIWP ),
                                       //MakeInParam("@PEEBIET",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIET ),
                                       MakeInParam("@PEEBIDL",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDL ),
                                       //MakeInParam("@PEEBIDN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDN ),
                                       //MakeInParam("@PBPRTTN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBPRTTN ),
                                       //MakeInParam("@PEEBIDNC",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIDNC ),
                                       //MakeInParam("@PEEBIWL",(DbType)SqlDbType.Float,53,_PEEBIEntity.PEEBIWL ),
                                       MakeInParam("@PEEBIED",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIED ),
                                       //MakeInParam("@PEEBIGF",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIGF ),
                                       //MakeInParam("@PEEBIEL",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEL ),
                                       //MakeInParam("@PBEDULN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBEDULN ),
                                       //MakeInParam("@PEEBILM",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBILM ),
                                       //MakeInParam("@PEEBIGD",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIGD ),
                                       //MakeInParam("@PEEBIIN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIIN ),
                                       //MakeInParam("@PEEBIIP",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIIP ),
                                       //MakeInParam("@PEEBIVY",(DbType)SqlDbType.Int,4,_PEEBIEntity.PEEBIVY ),
                                       //MakeInParam("@PEEBIRT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIRT ),
                                       //MakeInParam("@PBRETTN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBRETTN ),
                                       //MakeInParam("@PEEBIENA",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIENA ),
                                       //MakeInParam("@PEEBIMI",(DbType)SqlDbType.Char,1,_PEEBIEntity.PEEBIMI ),
                                       //MakeInParam("@PEEBINP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBINP ),
                                       //MakeInParam("@PEEBIRA",(DbType)SqlDbType.VarChar,100,_PEEBIEntity.PEEBIRA ),
                                       //MakeInParam("@PEEBISA",(DbType)SqlDbType.VarChar,100,_PEEBIEntity.PEEBISA ),
                                       MakeInParam("@PEEBICP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBICP ),
                                       //MakeInParam("@PEEBIECN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIECN ),
                                       //MakeInParam("@PEEBIECP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIECP ),
                                       MakeInParam("@PEEBIES",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIES ),

                                       MakeInParam("@PEEBIID",(DbType)SqlDbType.Int,4,_PEEBIEntity.PEEBIID ),
                                       //MakeInParam("@PBESTTN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBESTTN ),
                                       //MakeInParam("@PEEBIEST",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEST ),
                                       //MakeInParam("@PEEBIESN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIESN ),
                                       //MakeInParam("@PEEBIEP",(DbType)SqlDbType.Image,_PEEBIEntity.PEEBIEP.Length,_PEEBIEntity.PEEBIEP ),
                                       //MakeInParam("@PEETNTD",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEETNTD ),
                                       //MakeInParam("@PEEBIML",(DbType)SqlDbType.VarChar,100,_PEEBIEntity.PEEBIML ),
                                       //MakeInParam("@PEEBIOAAU",(DbType)SqlDbType.Char,1,_PEEBIEntity.PEEBIOAAU ),
                                             };
                StringBuilder sb = new StringBuilder();
                sb.Append(" declare @PEEBIDEPID int; select @PEEBIDEPID=PBDEPID from PBDEP where PBDEPDC=@PEEBIDEP; ");
                sb.Append("INSERT INTO [dbo].[PEEBI]");
                sb.Append("(");
                //sb.Append("[PEEBIEPHORN]");
                sb.Append("[PEEBIEC]");
                sb.Append(",[PEEBIEN]");
                //sb.Append(",[PEEBIEEN]");
                //sb.Append(",[PEEBIETWN]");
                //sb.Append(",[PEEBIEG]");
                sb.Append(",[PEEBIBD]");
                //sb.Append(",[PEEBIEA]");
                sb.Append(",[PEEBIDEPID]");
                sb.Append(",[PEEBIDEP]");
                sb.Append(",[PEEBIDT]");
                sb.Append(",[PEEBIPC]");
                //sb.Append(",[PEEBIWT]");
                //sb.Append(",[PEEBIPT]");
                //sb.Append(",[PBPOCCC]");
                //sb.Append(",[PEEBIWP]");
                //sb.Append(",[PEEBIET]");
                sb.Append(",[PEEBIDL]");
                //sb.Append(",[PEEBIDN]");
                //sb.Append(",[PEEBIDNC]");
                //sb.Append(",[PEEBIWL]");
                sb.Append(",[PEEBIED]");
                //sb.Append(",[PEEBIGF]");
                //sb.Append(",[PEEBIEL]");
                //sb.Append(",[PEEBILM]");
                //sb.Append(",[PEEBIGD]");
                //sb.Append(",[PEEBIIN]");
                //sb.Append(",[PEEBIIP]");
                //sb.Append(",[PEEBIVY]");
                //sb.Append(",[PEEBIRT]");
                //sb.Append(",[PEEBIENA]");
                //sb.Append(",[PEEBIMI]");
                //sb.Append(",[PEEBINP]");
                //sb.Append(",[PEEBIRA]");
                //sb.Append(",[PEEBISA]");
                sb.Append(",[PEEBICP]");
                //sb.Append(",[PEEBIECN]");
                //sb.Append(",[PEEBIECP]");
                sb.Append(",[PEEBIES]");
                sb.Append(",[PEEBIID]");
                //sb.Append(",[PEEBIEST]");
                //sb.Append(",[PEEBIESN]");
                //sb.Append(",[PEEBIEP]");
                //sb.Append(",[PEETNTD]");
                //sb.Append(",[PEEBIML]");
                //sb.Append(",[PEEBIOAAU]");
                sb.Append(") ");
                sb.Append(" VALUES (");
               // sb.Append("@PEEBIEPHORN,");
                sb.Append("@PEEBIEC,");
                sb.Append("@PEEBIEN,");
                //sb.Append("@PEEBIEEN,");
                //sb.Append("@PEEBIETWN,");
                //sb.Append("@PEEBIEG,");
                sb.Append("@PEEBIBD,");
               // sb.Append("@PEEBIEA,");
                sb.Append("@PEEBIDEPID,");
                sb.Append("@PEEBIDEP,");
                sb.Append("@PEEBIDT,");
                sb.Append("@PEEBIPC,");
                //sb.Append("@PEEBIWT,");
                //sb.Append("@PEEBIPT,");
                //sb.Append("@PBPOCCC,");
                //sb.Append("@PEEBIWP,");
                //sb.Append("@PEEBIET,");
                sb.Append("@PEEBIDL,");
                //sb.Append("@PEEBIDN,");
                //sb.Append("@PEEBIDNC,");
                //sb.Append("@PEEBIWL,");
                sb.Append("@PEEBIED,");
                //sb.Append("@PEEBIGF,");
                //sb.Append("@PEEBIEL,");
                //sb.Append("@PEEBILM,");
                //sb.Append("@PEEBIGD,");
                //sb.Append("@PEEBIIN,");
                //sb.Append("@PEEBIIP,");
                //sb.Append("@PEEBIVY,");
                //sb.Append("@PEEBIRT,");
                //sb.Append("@PEEBIENA,");
                //sb.Append("@PEEBIMI,");
                //sb.Append("@PEEBINP,");
                //sb.Append("@PEEBIRA,");
                //sb.Append("@PEEBISA,");
                sb.Append("@PEEBICP,");
                //sb.Append("@PEEBIECN,");
                //sb.Append("@PEEBIECP,");
                sb.Append("@PEEBIES,");
                sb.Append("@PEEBIID");
                //sb.Append("@PEEBIEST,");
                //sb.Append("@PEEBIESN,");
                //sb.Append("@PEEBIEP,");
                //sb.Append("@PEETNTD,");
                //sb.Append("@PEEBIML,");
                //sb.Append("@PEEBIOAAU)");
                sb.Append(") ");
               // sb.Append(" if (Datediff(day,'1900-01-01',@PEEBIDNC)=0) begin upDate PEEBI set PEEBIDNC=null where [PEEBIEC]=@PEEBIEC end");
               // sb.Append(" if (Datediff(day,'1900-01-01',@PEETNTD)=0) begin upDate PEEBI set PEETNTD=null where [PEEBIEC]=@PEEBIEC end");
                sb.Append(" select @PEEBIEC;");
                return ExecuteScalar(CommandType.Text, sb.ToString(), pramsInsert).ToString();
            }
        }
Esempio n. 4
0
        private PEEBIEntity GetPEEBIFromIDataReader(DbDataReader dr)
        {
            PEEBIEntity dt = new PEEBIEntity();
            if (dr.FieldCount > 0)
            {
                //dt.PBPRTTN = dr["PBPRTTN"].ToString();
                //dt.PEEBIENUP = dr["PEEBIENUP"].ToString();
                dt.PEEBIEC = dr["PEEBIEC"].ToString();
                dt.PEEBIEN = dr["PEEBIEN"].ToString();
                //dt.PEEBIEEN = dr["PEEBIEEN"].ToString();
                //dt.PEEBIETWN = dr["PEEBIETWN"].ToString();
                //dt.PEEBIEG = dr["PEEBIEG"].ToString();
                //dt.PBSEXCN = dr["PBSEXCN"].ToString();
                if (dr["PEEBIBD"].ToString() != "") dt.PEEBIBD = Convert.ToDateTime(dr["PEEBIBD"].ToString());
               // if (dr["PEEBIEA"].ToString() != "" || dr["PEEBIEA"] != null) dt.PEEBIEA = Int32.Parse(dr["PEEBIEA"].ToString());
                dt.PEEBIDEP = dr["PEEBIDEP"].ToString();
                //dt.PBDEPDN = dr["PBDEPDN"].ToString();
                //dt.PEEBIDEPLink = dr["PEEBIDEPLink"].ToString();
                //dt.PBDUTDN = dr["PBDUTDN"].ToString();
                dt.PEEBIDT = dr["PEEBIDT"].ToString();
                dt.PEEBIPC = dr["PEEBIPC"].ToString();
                //dt.PBPOSPN = dr["PBPOSPN"].ToString();
                //dt.PBEWTTN = dr["PBEWTTN"].ToString();
                //dt.PEEBIWT = dr["PEEBIWT"].ToString();
                //dt.PEEBIPT = dr["PEEBIPT"].ToString();
                //dt.PBPOTTN = dr["PBPOTTN"].ToString();
                //dt.PBPOCCC = dr["PBPOCCC"].ToString();
                //dt.PBPOCCN = dr["PBPOCCN"].ToString();
                //dt.PEEBIWP = dr["PEEBIWP"].ToString();
                //dt.PEEBIWPN = dr["PEEBIWPN"].ToString();
                //dt.PEEBIET = dr["PEEBIET"].ToString();
                //dt.PEEBIETN = dr["PEEBIETN"].ToString();
                dt.PEEBIDL = dr["PEEBIDL"].ToString();
                //dt.PEEBIDN = dr["PEEBIDN"].ToString();
                //dt.PEEBIDNC = dr["PEEBIDNC"].ToString();
                //if (dr["PEEBIDNC"].ToString() != "") dt.PEEBIDNC = Convert.ToDateTime(dr["PEEBIDNC"].ToString());
                //if (dr["PEEBIWL"].ToString() != "") dt.PEEBIWL = Convert.ToDouble(dr["PEEBIWL"].ToString());
                dt.PEEBIED = (DateTime)dr["PEEBIED"];
                if (dr["PEEBIED"].ToString() != "") dt.PEEBIED = Convert.ToDateTime(dr["PEEBIED"].ToString());
                //dt.PEEBIGF = dr["PEEBIGF"].ToString();
                //dt.PEEBIEL = dr["PEEBIEL"].ToString();
                //dt.PBEDULN = dr["PBEDULN"].ToString();
                //dt.PEEBILM = dr["PEEBILM"].ToString();
                //dt.PEEBIGD = dr["PEEBIGD"].ToString();
                //if (dr["PEEBIGD"].ToString() != "") dt.PEEBIGD = Convert.ToDateTime(dr["PEEBIGD"].ToString());
                //dt.PEEBIIN = dr["PEEBIIN"].ToString();
                //dt.PEEBIIP = dr["PEEBIIP"].ToString();
                //if (dr["PEEBIIP"].ToString() != "") dt.PEEBIIP = Convert.ToDateTime(dr["PEEBIIP"].ToString());
               //// if (dr["PEEBIVY"].ToString() != "" || dr["PEEBIVY"] != null) dt.PEEBIVY = Int32.Parse(dr["PEEBIVY"].ToString());
               // dt.PEEBIRT = dr["PEEBIRT"].ToString();
               // dt.PBRETTN = dr["PBRETTN"].ToString();
               // dt.PEEBIENA = dr["PEEBIENA"].ToString();
               // dt.PBNATNN = dr["PBNATNN"].ToString();
               // dt.PBMARCN = dr["PBMARCN"].ToString();
               // dt.PEEBIMI = dr["PEEBIMI"].ToString();
               // dt.PEEBINP = dr["PEEBINP"].ToString();
               // dt.PEEBINPFullName = dr["PEEBINPFullName"].ToString();
               // dt.PEEBIRA = dr["PEEBIRA"].ToString();
               // dt.PEEBISA = dr["PEEBISA"].ToString();
               // dt.PEEBICP = dr["PEEBICP"].ToString();
               // dt.PEEBIECN = dr["PEEBIECN"].ToString();
               // dt.PEEBIECP = dr["PEEBIECP"].ToString();
                dt.PEEBIES = dr["PEEBIES"].ToString();
                dt.PEEBIID = Int32.Parse(dr["PEEBIID"].ToString());

                //dt.PBESTTN = dr["PBESTTN"].ToString();
                //dt.PBESETN = dr["PBESETN"].ToString();
                //dt.PEEBIEST = dr["PEEBIEST"].ToString();
                //dt.PEEBIESN = dr["PEEBIESN"].ToString();
                //if (dr["PEETNTD"].ToString() != "") dt.PEETNTD = Convert.ToDateTime(dr["PEETNTD"].ToString());
                //dt.PEEBIML = dr["PEEBIML"].ToString();
                //dt.PEEBIOAAU = dr["PEEBIOAAU"].ToString();
                if (Convert.IsDBNull(dr["PEEBIEP"]))
                {
                }
                else
                {
                   // if (((byte[])dr["PEEBIEP"]).Length > 0)
                       // dt.PEEBIEP = (byte[])dr["PEEBIEP"];
                }
                //dt.PEEBIEPHORN = dr["PEEBIEPHORN"].ToString();

                dr.Close();
                return dt;
            }
            dr.Close();
            return null;
        }
Esempio n. 5
0
        /// <summary>
        /// 修改信息
        /// </summary>
        /// <param name="_PEEBIEntity"></param>
        /// <returns>返回string "-1"表示该已经存在,否则成功 </returns>
        public string UpDatePEEBI(PEEBIEntity _PEEBIEntity)
        {
            //if (_PEEBIEntity.PEEBIEP == null)
            //{
            //    _PEEBIEntity.PEEBIEPHORN = "无";
            //}
            //else if (_PEEBIEntity.PEEBIEP.Length == 0)
            //{
            //    _PEEBIEntity.PEEBIEPHORN = "无";
            //}
            DbParameter[] pramsUpDate = {
                                      // MakeInParam("@PEEBIEPHORN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEPHORN ),
                                       MakeInParam("@PEEBIEC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEC ),
                                       MakeInParam("@PEEBIEN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEN ),
                                       //MakeInParam("@PEEBIEEN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEEN ),
                                       //MakeInParam("@PEEBIETWN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIETWN ),
                                       //MakeInParam("@PEEBIEG",(DbType)SqlDbType.Char,1,_PEEBIEntity.PEEBIEG ),
                                       MakeInParam("@PEEBIBD",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIBD ),
                                       //MakeInParam("@PEEBIEA",(DbType)SqlDbType.Int,4,_PEEBIEntity.PEEBIEA ),
                                       MakeInParam("@PEEBIDEP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDEP ),
                                       MakeInParam("@PEEBIDT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDT ),
                                       MakeInParam("@PEEBIPC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIPC ),
                                       //MakeInParam("@PEEBIWT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIWT ),
                                       //MakeInParam("@PEEBIPT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIPT ),
                                       //MakeInParam("@PBPOCCC",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBPOCCC ),
                                       //MakeInParam("@PEEBIWP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIWP ),
                                       //MakeInParam("@PEEBIET",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIET ),
                                       MakeInParam("@PEEBIDL",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDL ),
                                       //MakeInParam("@PEEBIDN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIDN ),
                                       //MakeInParam("@PBPRTTN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBPRTTN ),
                                       //MakeInParam("@PEEBIDNC",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIDNC ),
                                       //MakeInParam("@PEEBIWL",(DbType)SqlDbType.Float,53,_PEEBIEntity.PEEBIWL ),
                                       MakeInParam("@PEEBIED",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIED ),
                                       //MakeInParam("@PEEBIGF",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIGF ),
                                       //MakeInParam("@PEEBIEL",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEL ),
                                       //MakeInParam("@PBEDULN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBEDULN ),
                                       //MakeInParam("@PEEBILM",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBILM ),
                                       //MakeInParam("@PEEBIGD",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIGD ),
                                       //MakeInParam("@PEEBIIN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIIN ),
                                       //MakeInParam("@PEEBIIP",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEEBIIP ),
                                       //MakeInParam("@PEEBIVY",(DbType)SqlDbType.Int,4,_PEEBIEntity.PEEBIVY ),
                                       //MakeInParam("@PEEBIRT",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIRT ),
                                       //MakeInParam("@PBRETTN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBRETTN ),
                                       //MakeInParam("@PEEBIENA",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIENA ),
                                       //MakeInParam("@PEEBIMI",(DbType)SqlDbType.Char,1,_PEEBIEntity.PEEBIMI ),
                                       //MakeInParam("@PEEBINP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBINP ),
                                       //MakeInParam("@PEEBIRA",(DbType)SqlDbType.VarChar,100,_PEEBIEntity.PEEBIRA ),
                                       //MakeInParam("@PEEBISA",(DbType)SqlDbType.VarChar,100,_PEEBIEntity.PEEBISA ),
                                       MakeInParam("@PEEBICP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBICP ),
                                       //MakeInParam("@PEEBIECN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIECN ),
                                       //MakeInParam("@PEEBIECP",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIECP ),
                                       MakeInParam("@PEEBIES",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIES ),

                                       MakeInParam("@PEEBIID",(DbType)SqlDbType.Int,4,_PEEBIEntity.PEEBIID ),
                                       //MakeInParam("@PBESTTN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PBESTTN ),
                                       //MakeInParam("@PEEBIEST",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIEST ),
                                       //MakeInParam("@PEEBIESN",(DbType)SqlDbType.VarChar,50,_PEEBIEntity.PEEBIESN ),
                                       //MakeInParam("@PEEBIEP",(DbType)SqlDbType.Image,(_PEEBIEntity.PEEBIEP ==null)?0:_PEEBIEntity.PEEBIEP.Length,_PEEBIEntity.PEEBIEP ),
                                       //MakeInParam("@PEETNTD",(DbType)SqlDbType.DateTime,16,_PEEBIEntity.PEETNTD ),
                                       //MakeInParam("@PEEBIML",(DbType)SqlDbType.VarChar,100,_PEEBIEntity.PEEBIML ),
                                       //MakeInParam("@PEEBIOAAU",(DbType)SqlDbType.Char,1,_PEEBIEntity.PEEBIOAAU ),
                        };
            StringBuilder sb = new StringBuilder();
            sb.Append("UpDate [dbo].[PEEBI]");
            sb.Append(" set ");
            //sb.Append(" [PEEBIEPHORN]=@PEEBIEPHORN,");
            sb.Append(" [PEEBIEN]=@PEEBIEN,");
            //sb.Append(" [PEEBIEEN]=@PEEBIEEN,");
            //sb.Append(" [PEEBIETWN]=@PEEBIETWN,");
            //sb.Append(" [PEEBIEG]=@PEEBIEG,");
            sb.Append(" [PEEBIBD]=@PEEBIBD,");
            //sb.Append(" [PEEBIEA]=@PEEBIEA,");
            sb.Append(" [PEEBIDEP]=@PEEBIDEP,");
            sb.Append(" [PEEBIDT]=@PEEBIDT,");
            sb.Append(" [PEEBIPC]=@PEEBIPC,");
            //sb.Append(" [PEEBIWT]=@PEEBIWT,");
            //sb.Append(" [PEEBIPT]=@PEEBIPT,");
            //sb.Append(" [PBPOCCC]=@PBPOCCC,");
            //sb.Append(" [PEEBIWP]=@PEEBIWP,");
            //sb.Append(" [PEEBIET]=@PEEBIET,");
            //sb.Append(" [PEEBIDL]=@PEEBIDL,");
            //sb.Append(" [PEEBIDN]=@PEEBIDN,");
            //sb.Append(" [PEEBIDNC]=@PEEBIDNC,");
            //sb.Append(" [PEEBIWL]=@PEEBIWL,");
            //sb.Append(" [PEEBIED]=@PEEBIED,");
            //sb.Append(" [PEEBIGF]=@PEEBIGF,");
            //sb.Append(" [PEEBIEL]=@PEEBIEL,");
            //sb.Append(" [PEEBILM]=@PEEBILM,");
            //sb.Append(" [PEEBIGD]=@PEEBIGD,");
            //sb.Append(" [PEEBIIN]=@PEEBIIN,");
            //sb.Append(" [PEEBIIP]=@PEEBIIP,");
            //sb.Append(" [PEEBIVY]=@PEEBIVY,");
            //sb.Append(" [PEEBIRT]=@PEEBIRT,");
            //sb.Append(" [PBRETTN]=@PBRETTN,");
            //sb.Append(" [PEEBIENA]=@PEEBIENA,");
            //sb.Append(" [PEEBIMI]=@PEEBIMI,");
            //sb.Append(" [PEEBINP]=@PEEBINP,");
            //sb.Append(" [PEEBIRA]=@PEEBIRA,");
            //sb.Append(" [PEEBISA]=@PEEBISA,");
            sb.Append(" [PEEBICP]=@PEEBICP,");
            sb.Append(" [PEEBIID]=@PEEBIID,");
            //sb.Append(" [PEEBIECN]=@PEEBIECN,");
            //sb.Append(" [PEEBIECP]=@PEEBIECP,");
            sb.Append(" [PEEBIES]=@PEEBIES");
            //sb.Append(" [PEEBIEST]=@PEEBIEST,");
            //sb.Append(" [PEEBIESN]=@PEEBIESN,");
            //sb.Append(" [PEEBIEP]=@PEEBIEP, ");
            //sb.Append(" [PEETNTD]=@PEETNTD, ");
            //sb.Append(" [PEEBIML]=@PEEBIML, ");
            //sb.Append(" [PEEBIOAAU]=@PEEBIOAAU ");
            sb.Append(" where [PEEBIEC]=@PEEBIEC ");
              //  sb.Append(" if (Datediff(day,'1900-01-01',@PEEBIDNC)=0) begin upDate PEEBI set PEEBIDNC=null where [PEEBIEC]=@PEEBIEC end");
               // sb.Append(" if (Datediff(day,'1900-01-01',@PEETNTD)=0) begin upDate PEEBI set PEETNTD=null where [PEEBIEC]=@PEEBIEC end");
            sb.Append(" select @PEEBIEC ");
            return ExecuteScalar(CommandType.Text, sb.ToString(), pramsUpDate).ToString();
        }