Ejemplo n.º 1
0
 public void Add(TB_PROJECT_BZ_Model model)
 {
     StringBuilder builder = new StringBuilder();
     model.PD_PROJECT_CODE = DateTime.Now.ToString("yyyyMMddhhmmssffffff");
     builder.Append("insert into TB_PROJECT(");
     builder.Append("PD_PROJECT_FILENO_ZB,PD_PROJECT_CODE,PD_PROJECT_NAME,PD_YEAR,PD_PROJECT_TYPE,PD_GK_DEPART,PD_FOUND_XZ,PD_PROJECT_IFGS,PD_PROJECT_IFGS_BEFORE,PD_PROJECT_OPEN_BODY,PD_PROJECT_STATUS,PD_PROJECT_FILENO_JG,PD_PROJECT_INPUT_COMPANY,PD_PROJECT_INPUT_MAN,PD_PROJECT_INPUT_DATE,PD_PROJECT_BZYJ,PD_PROJECT_BZFW,PD_PROJECT_BZDX,PD_PROJECT_BZNUM,PD_PROJECT_BZSTAND_NUM,PD_PROJECT_BZMONEY,PD_PROJECT_BZFF_DATE,PD_PROJECT_SJFF_DATE,PD_PROJECT_IFFF,PD_PROJECT_JGYQ,PD_PROJECT_JGJL,PD_PROJECT_JG_RESULT,PD_PROJECT_SERVERPK)");
     builder.Append(" values (");
     builder.Append(":PD_PROJECT_FILENO_ZB,:PD_PROJECT_CODE,:PD_PROJECT_NAME,:PD_YEAR,:PD_PROJECT_TYPE,:PD_GK_DEPART,:PD_FOUND_XZ,:PD_PROJECT_IFGS,:PD_PROJECT_IFGS_BEFORE,:PD_PROJECT_OPEN_BODY,:PD_PROJECT_STATUS,:PD_PROJECT_FILENO_JG,:PD_PROJECT_INPUT_COMPANY,:PD_PROJECT_INPUT_MAN,:PD_PROJECT_INPUT_DATE,:PD_PROJECT_BZYJ,:PD_PROJECT_BZFW,:PD_PROJECT_BZDX,:PD_PROJECT_BZNUM,:PD_PROJECT_BZSTAND_NUM,:PD_PROJECT_BZMONEY,:PD_PROJECT_BZFF_DATE,:PD_PROJECT_SJFF_DATE,:PD_PROJECT_IFFF,:PD_PROJECT_JGYQ,:PD_PROJECT_JGJL,:PD_PROJECT_JG_RESULT,:PD_PROJECT_SERVERPK)");
     builder.Append(" RETURNING PD_PROJECT_CODE INTO :R_Auto_No ");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":PD_PROJECT_FILENO_ZB", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24), new OracleParameter(":PD_PROJECT_NAME", OracleType.VarChar, 100), new OracleParameter(":PD_YEAR", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_TYPE", OracleType.VarChar, 30), new OracleParameter(":PD_GK_DEPART", OracleType.VarChar, 100), new OracleParameter(":PD_FOUND_XZ", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_IFGS", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_IFGS_BEFORE", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_OPEN_BODY", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_STATUS", OracleType.VarChar, 20), new OracleParameter(":PD_PROJECT_FILENO_JG", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_INPUT_COMPANY", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_INPUT_MAN", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_INPUT_DATE", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_BZYJ", OracleType.VarChar, 100),
         new OracleParameter(":PD_PROJECT_BZFW", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_BZDX", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_BZNUM", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_BZSTAND_NUM", OracleType.VarChar, 200), new OracleParameter(":PD_PROJECT_BZMONEY", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_BZFF_DATE", OracleType.DateTime), new OracleParameter(":PD_PROJECT_SJFF_DATE", OracleType.DateTime), new OracleParameter(":PD_PROJECT_IFFF", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_JGYQ", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_JGJL", OracleType.VarChar, 0xfa0), new OracleParameter(":PD_PROJECT_JG_RESULT", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_SERVERPK", OracleType.VarChar, 100), new OracleParameter(":R_Auto_No", OracleType.Number, 20)
      };
     cmdParms[0].Value = model.PD_PROJECT_FILENO_ZB;
     cmdParms[1].Value = model.PD_PROJECT_CODE;
     cmdParms[2].Value = model.PD_PROJECT_NAME;
     cmdParms[3].Value = model.PD_YEAR;
     cmdParms[4].Value = model.PD_PROJECT_TYPE;
     cmdParms[5].Value = model.PD_GK_DEPART;
     cmdParms[6].Value = model.PD_FOUND_XZ;
     cmdParms[7].Value = model.PD_PROJECT_IFGS;
     cmdParms[8].Value = model.PD_PROJECT_IFGS_BEFORE;
     cmdParms[9].Value = model.PD_PROJECT_OPEN_BODY;
     cmdParms[10].Value = model.PD_PROJECT_STATUS;
     cmdParms[11].Value = model.PD_PROJECT_FILENO_JG;
     cmdParms[12].Value = model.PD_PROJECT_INPUT_COMPANY;
     cmdParms[13].Value = model.PD_PROJECT_INPUT_MAN;
     cmdParms[14].Value = model.PD_PROJECT_INPUT_DATE;
     cmdParms[15].Value = model.PD_PROJECT_BZYJ;
     cmdParms[0x10].Value = model.PD_PROJECT_BZFW;
     cmdParms[0x11].Value = model.PD_PROJECT_BZDX;
     cmdParms[0x12].Value = model.PD_PROJECT_BZNUM;
     cmdParms[0x13].Value = model.PD_PROJECT_BZSTAND_NUM;
     cmdParms[20].Value = model.PD_PROJECT_BZMONEY;
     cmdParms[0x15].Value = model.PD_PROJECT_BZFF_DATE;
     cmdParms[0x16].Value = model.PD_PROJECT_SJFF_DATE;
     cmdParms[0x17].Value = model.PD_PROJECT_IFFF;
     cmdParms[0x18].Value = model.PD_PROJECT_JGYQ;
     cmdParms[0x19].Value = model.PD_PROJECT_JGJL;
     cmdParms[0x1a].Value = model.PD_PROJECT_JG_RESULT;
     cmdParms[0x1b].Value = model.PD_PROJECT_SERVERPK;
     cmdParms[0x1c].Direction = ParameterDirection.Output;
     DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
     model.PD_PROJECT_CODE = cmdParms[0x1c].Value.ToString();
 }
Ejemplo n.º 2
0
 private TB_PROJECT_BZ_Model GetModel(TB_PROJECT_BZ_Model model)
 {
     if (model == null)
     {
         model = new TB_PROJECT_BZ_Model();
         this.txtPD_PROJECT_INPUT_COMPANY.Text = ((UserModel)HttpContext.Current.Session["User"]).Company.pk_corp;
         this.txtPD_PROJECT_INPUT_MAN.Text = ((UserModel)HttpContext.Current.Session["User"]).UserName;
     }
     string str = this.txtPD_PROJECT_FILENO_ZB.Value;
     string text = this.txtPD_PROJECT_NAME.Text;
     int num = int.Parse(this.ddlPD_YEAR.SelectedValue);
     string selectedValue = this.ddlPD_PROJECT_TYPE.SelectedValue;
     string str4 = this.ddlPD_GK_DEPART.SelectedValue;
     string str5 = this.ddlPD_FOUND_XZ.SelectedValue;
     if (PublicDal.PageValidate.IsNumber(this.ddlPD_PROJECT_IFGS.SelectedValue))
     {
         model.PD_PROJECT_IFGS = new int?(int.Parse(this.ddlPD_PROJECT_IFGS.SelectedValue));
     }
     if (PublicDal.PageValidate.IsNumber(this.ddlPD_PROJECT_IFGS_BEFORE.SelectedValue))
     {
         model.PD_PROJECT_IFGS_BEFORE = new int?(int.Parse(this.ddlPD_PROJECT_IFGS_BEFORE.SelectedValue));
     }
     string str6 = this.txtPD_PROJECT_OPEN_BODY.Text;
     string str7 = this.ddlPD_PROJECT_STATUS.SelectedValue;
     string str8 = this.txtPD_PROJECT_FILENO_JG.Text;
     string str9 = this.txtPD_PROJECT_BZYJ.Text;
     string str10 = this.txtPD_PROJECT_BZFW.Text;
     string str11 = this.txtPD_PROJECT_BZDX.Text;
     if (PublicDal.PageValidate.IsNumber(this.txtPD_PROJECT_BZNUM.Text))
     {
         model.PD_PROJECT_BZNUM = new decimal?(decimal.Parse(this.txtPD_PROJECT_BZNUM.Text));
     }
     model.PD_PROJECT_BZSTAND_NUM = this.txtPD_PROJECT_BZSTAND_NUM.Text;
     if (PublicDal.PageValidate.IsDecimal(this.txtPD_PROJECT_BZMONEY.Text))
     {
         model.PD_PROJECT_BZMONEY = new decimal?(decimal.Parse(this.txtPD_PROJECT_BZMONEY.Text));
     }
     if (PublicDal.PageValidate.IsDateTime(this.txtPD_PROJECT_BZFF_DATE.Text))
     {
         model.PD_PROJECT_BZFF_DATE = new DateTime?(DateTime.Parse(this.txtPD_PROJECT_BZFF_DATE.Text));
     }
     if (PublicDal.PageValidate.IsDateTime(this.txtPD_PROJECT_SJFF_DATE.Text))
     {
         model.PD_PROJECT_SJFF_DATE = new DateTime?(DateTime.Parse(this.txtPD_PROJECT_SJFF_DATE.Text));
     }
     if (PublicDal.PageValidate.IsNumber(this.ddlPD_PROJECT_IFFF.SelectedValue))
     {
         model.PD_PROJECT_IFFF = new int?(int.Parse(this.ddlPD_PROJECT_IFFF.SelectedValue));
     }
     string str12 = this.txtPD_PROJECT_JGYQ.Text;
     string str13 = this.txtPD_PROJECT_JGJL.Text;
     string str14 = this.txtPD_PROJECT_JG_RESULT.Text;
     model.PD_PROJECT_FILENO_ZB = str;
     model.PD_PROJECT_NAME = text;
     model.PD_YEAR = new int?(num);
     model.PD_PROJECT_TYPE = selectedValue;
     model.PD_GK_DEPART = str4;
     model.PD_FOUND_XZ = str5;
     model.PD_PROJECT_OPEN_BODY = str6;
     model.PD_PROJECT_STATUS = str7;
     model.PD_PROJECT_FILENO_JG = str8;
     model.PD_PROJECT_BZYJ = str9;
     model.PD_PROJECT_BZFW = str10;
     model.PD_PROJECT_BZDX = str11;
     model.PD_PROJECT_JGYQ = str12;
     model.PD_PROJECT_JGJL = str13;
     model.PD_PROJECT_JG_RESULT = str14;
     model.PD_PROJECT_INPUT_DATE = DateTime.Now.ToString("yyyy-MM-dd");
     model.PD_PROJECT_INPUT_COMPANY = ((UserModel)this.Session["User"]).Company.pk_corp;
     model.PD_PROJECT_INPUT_MAN = ((UserModel)this.Session["User"]).UserName;
     return model;
 }
Ejemplo n.º 3
0
 public bool Update(TB_PROJECT_BZ_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update TB_PROJECT set ");
     builder.Append("PD_PROJECT_FILENO_ZB=:PD_PROJECT_FILENO_ZB,");
     builder.Append("PD_PROJECT_NAME=:PD_PROJECT_NAME,");
     builder.Append("PD_YEAR=:PD_YEAR,");
     builder.Append("PD_PROJECT_TYPE=:PD_PROJECT_TYPE,");
     builder.Append("PD_GK_DEPART=:PD_GK_DEPART,");
     builder.Append("PD_FOUND_XZ=:PD_FOUND_XZ,");
     builder.Append("PD_PROJECT_IFGS=:PD_PROJECT_IFGS,");
     builder.Append("PD_PROJECT_IFGS_BEFORE=:PD_PROJECT_IFGS_BEFORE,");
     builder.Append("PD_PROJECT_OPEN_BODY=:PD_PROJECT_OPEN_BODY,");
     builder.Append("PD_PROJECT_STATUS=:PD_PROJECT_STATUS,");
     builder.Append("PD_PROJECT_FILENO_JG=:PD_PROJECT_FILENO_JG,");
     builder.Append("PD_PROJECT_INPUT_COMPANY=:PD_PROJECT_INPUT_COMPANY,");
     builder.Append("PD_PROJECT_INPUT_MAN=:PD_PROJECT_INPUT_MAN,");
     builder.Append("PD_PROJECT_INPUT_DATE=:PD_PROJECT_INPUT_DATE,");
     builder.Append("PD_PROJECT_BZYJ=:PD_PROJECT_BZYJ,");
     builder.Append("PD_PROJECT_BZFW=:PD_PROJECT_BZFW,");
     builder.Append("PD_PROJECT_BZDX=:PD_PROJECT_BZDX,");
     builder.Append("PD_PROJECT_BZNUM=:PD_PROJECT_BZNUM,");
     builder.Append("PD_PROJECT_BZSTAND_NUM=:PD_PROJECT_BZSTAND_NUM,");
     builder.Append("PD_PROJECT_BZMONEY=:PD_PROJECT_BZMONEY,");
     builder.Append("PD_PROJECT_BZFF_DATE=:PD_PROJECT_BZFF_DATE,");
     builder.Append("PD_PROJECT_SJFF_DATE=:PD_PROJECT_SJFF_DATE,");
     builder.Append("PD_PROJECT_IFFF=:PD_PROJECT_IFFF,");
     builder.Append("PD_PROJECT_JGYQ=:PD_PROJECT_JGYQ,");
     builder.Append("PD_PROJECT_JGJL=:PD_PROJECT_JGJL,");
     builder.Append("PD_PROJECT_JG_RESULT=:PD_PROJECT_JG_RESULT");
     builder.Append(" where PD_PROJECT_CODE=:PD_PROJECT_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":PD_PROJECT_FILENO_ZB", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_NAME", OracleType.VarChar, 100), new OracleParameter(":PD_YEAR", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_TYPE", OracleType.VarChar, 30), new OracleParameter(":PD_GK_DEPART", OracleType.VarChar, 100), new OracleParameter(":PD_FOUND_XZ", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_IFGS", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_IFGS_BEFORE", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_OPEN_BODY", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_STATUS", OracleType.VarChar, 20), new OracleParameter(":PD_PROJECT_FILENO_JG", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_INPUT_COMPANY", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_INPUT_MAN", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_INPUT_DATE", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_BZYJ", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_BZFW", OracleType.VarChar, 100),
         new OracleParameter(":PD_PROJECT_BZDX", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_BZNUM", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_BZSTAND_NUM", OracleType.VarChar, 200), new OracleParameter(":PD_PROJECT_BZMONEY", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_BZFF_DATE", OracleType.DateTime), new OracleParameter(":PD_PROJECT_SJFF_DATE", OracleType.DateTime), new OracleParameter(":PD_PROJECT_IFFF", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_JGYQ", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_JGJL", OracleType.VarChar, 0xfa0), new OracleParameter(":PD_PROJECT_JG_RESULT", OracleType.VarChar, 100), new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24)
      };
     cmdParms[0].Value = model.PD_PROJECT_FILENO_ZB;
     cmdParms[1].Value = model.PD_PROJECT_NAME;
     cmdParms[2].Value = model.PD_YEAR;
     cmdParms[3].Value = model.PD_PROJECT_TYPE;
     cmdParms[4].Value = model.PD_GK_DEPART;
     cmdParms[5].Value = model.PD_FOUND_XZ;
     cmdParms[6].Value = model.PD_PROJECT_IFGS;
     cmdParms[7].Value = model.PD_PROJECT_IFGS_BEFORE;
     cmdParms[8].Value = model.PD_PROJECT_OPEN_BODY;
     cmdParms[9].Value = model.PD_PROJECT_STATUS;
     cmdParms[10].Value = model.PD_PROJECT_FILENO_JG;
     cmdParms[11].Value = model.PD_PROJECT_INPUT_COMPANY;
     cmdParms[12].Value = model.PD_PROJECT_INPUT_MAN;
     cmdParms[13].Value = model.PD_PROJECT_INPUT_DATE;
     cmdParms[14].Value = model.PD_PROJECT_BZYJ;
     cmdParms[15].Value = model.PD_PROJECT_BZFW;
     cmdParms[0x10].Value = model.PD_PROJECT_BZDX;
     cmdParms[0x11].Value = model.PD_PROJECT_BZNUM;
     cmdParms[0x12].Value = model.PD_PROJECT_BZSTAND_NUM;
     cmdParms[0x13].Value = model.PD_PROJECT_BZMONEY;
     cmdParms[20].Value = model.PD_PROJECT_BZFF_DATE;
     cmdParms[0x15].Value = model.PD_PROJECT_SJFF_DATE;
     cmdParms[0x16].Value = model.PD_PROJECT_IFFF;
     cmdParms[0x17].Value = model.PD_PROJECT_JGYQ;
     cmdParms[0x18].Value = model.PD_PROJECT_JGJL;
     cmdParms[0x19].Value = model.PD_PROJECT_JG_RESULT;
     cmdParms[0x1a].Value = model.PD_PROJECT_CODE;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
Ejemplo n.º 4
0
 public TB_PROJECT_BZ_Model GetModelName(string PD_PROJECT_CODE)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select op.ShowText PD_PROJECT_FILENO_ZB,PD_PROJECT_FILENO_ZB PD_PROJECT_FILENO_ZB_CODE,PD_PROJECT_CODE,PD_PROJECT_NAME,PD_YEAR,PD_PROJECT_TYPE,PD_GK_DEPART,PD_FOUND_XZ,PD_PROJECT_IFGS,PD_PROJECT_IFGS_BEFORE,PD_PROJECT_OPEN_BODY,PD_PROJECT_STATUS,PD_PROJECT_FILENO_JG,PD_PROJECT_INPUT_COMPANY,PD_PROJECT_INPUT_MAN,PD_PROJECT_INPUT_DATE,PD_PROJECT_BZYJ,PD_PROJECT_BZFW,PD_PROJECT_BZDX,PD_PROJECT_BZNUM,PD_PROJECT_BZSTAND_NUM,PD_PROJECT_BZMONEY,PD_PROJECT_BZFF_DATE,PD_PROJECT_SJFF_DATE,PD_PROJECT_IFFF,PD_PROJECT_JGYQ,PD_PROJECT_JGJL,PD_PROJECT_JG_RESULT");
     builder.Append(" from TB_PROJECT t");
     builder.Append(" left join open_pd_quotaaddmoney op on trim(op.pd_quota_code)=trim(t.PD_PROJECT_FILENO_ZB) ");
     builder.Append(" where t.PD_PROJECT_CODE=:PD_PROJECT_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 50) };
     cmdParms[0].Value = PD_PROJECT_CODE;
     TB_PROJECT_BZ_Model model = new TB_PROJECT_BZ_Model();
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     model.PD_PROJECT_FILENO_ZB = set.Tables[0].Rows[0]["PD_PROJECT_FILENO_ZB"].ToString();
     model.PD_PROJECT_FILENO_ZB_CODE = set.Tables[0].Rows[0]["PD_PROJECT_FILENO_ZB_CODE"].ToString();
     model.PD_PROJECT_CODE = set.Tables[0].Rows[0]["PD_PROJECT_CODE"].ToString();
     model.PD_PROJECT_NAME = set.Tables[0].Rows[0]["PD_PROJECT_NAME"].ToString();
     if (set.Tables[0].Rows[0]["PD_YEAR"].ToString() != "")
     {
         model.PD_YEAR = new int?(int.Parse(set.Tables[0].Rows[0]["PD_YEAR"].ToString()));
     }
     model.PD_PROJECT_TYPE = set.Tables[0].Rows[0]["PD_PROJECT_TYPE"].ToString();
     model.PD_GK_DEPART = set.Tables[0].Rows[0]["PD_GK_DEPART"].ToString();
     model.PD_FOUND_XZ = set.Tables[0].Rows[0]["PD_FOUND_XZ"].ToString();
     if (set.Tables[0].Rows[0]["PD_PROJECT_IFGS"].ToString() != "")
     {
         model.PD_PROJECT_IFGS = new int?(int.Parse(set.Tables[0].Rows[0]["PD_PROJECT_IFGS"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_PROJECT_IFGS_BEFORE"].ToString() != "")
     {
         model.PD_PROJECT_IFGS_BEFORE = new int?(int.Parse(set.Tables[0].Rows[0]["PD_PROJECT_IFGS_BEFORE"].ToString()));
     }
     model.PD_PROJECT_OPEN_BODY = set.Tables[0].Rows[0]["PD_PROJECT_OPEN_BODY"].ToString();
     model.PD_PROJECT_STATUS = set.Tables[0].Rows[0]["PD_PROJECT_STATUS"].ToString();
     model.PD_PROJECT_FILENO_JG = set.Tables[0].Rows[0]["PD_PROJECT_FILENO_JG"].ToString();
     model.PD_PROJECT_INPUT_COMPANY = set.Tables[0].Rows[0]["PD_PROJECT_INPUT_COMPANY"].ToString();
     model.PD_PROJECT_INPUT_MAN = set.Tables[0].Rows[0]["PD_PROJECT_INPUT_MAN"].ToString();
     model.PD_PROJECT_INPUT_DATE = set.Tables[0].Rows[0]["PD_PROJECT_INPUT_DATE"].ToString();
     model.PD_PROJECT_BZYJ = set.Tables[0].Rows[0]["PD_PROJECT_BZYJ"].ToString();
     model.PD_PROJECT_BZFW = set.Tables[0].Rows[0]["PD_PROJECT_BZFW"].ToString();
     model.PD_PROJECT_BZDX = set.Tables[0].Rows[0]["PD_PROJECT_BZDX"].ToString();
     if (set.Tables[0].Rows[0]["PD_PROJECT_BZNUM"].ToString() != "")
     {
         model.PD_PROJECT_BZNUM = new decimal?(decimal.Parse(set.Tables[0].Rows[0]["PD_PROJECT_BZNUM"].ToString()));
     }
     model.PD_PROJECT_BZSTAND_NUM = set.Tables[0].Rows[0]["PD_PROJECT_BZSTAND_NUM"].ToString();
     if (set.Tables[0].Rows[0]["PD_PROJECT_BZMONEY"].ToString() != "")
     {
         model.PD_PROJECT_BZMONEY = new decimal?(decimal.Parse(set.Tables[0].Rows[0]["PD_PROJECT_BZMONEY"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_PROJECT_BZFF_DATE"].ToString() != "")
     {
         model.PD_PROJECT_BZFF_DATE = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["PD_PROJECT_BZFF_DATE"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_PROJECT_SJFF_DATE"].ToString() != "")
     {
         model.PD_PROJECT_SJFF_DATE = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["PD_PROJECT_SJFF_DATE"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_PROJECT_IFFF"].ToString() != "")
     {
         model.PD_PROJECT_IFFF = new int?(int.Parse(set.Tables[0].Rows[0]["PD_PROJECT_IFFF"].ToString()));
     }
     model.PD_PROJECT_JGYQ = set.Tables[0].Rows[0]["PD_PROJECT_JGYQ"].ToString();
     model.PD_PROJECT_JGJL = set.Tables[0].Rows[0]["PD_PROJECT_JGJL"].ToString();
     model.PD_PROJECT_JG_RESULT = set.Tables[0].Rows[0]["PD_PROJECT_JG_RESULT"].ToString();
     return model;
 }
Ejemplo n.º 5
0
 public List<TB_PROJECT_BZ_Model> DataTableToList(DataTable dt)
 {
     List<TB_PROJECT_BZ_Model> list = new List<TB_PROJECT_BZ_Model>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             TB_PROJECT_BZ_Model item = new TB_PROJECT_BZ_Model {
                 PD_PROJECT_FILENO_ZB = dt.Rows[i]["PD_PROJECT_FILENO_ZB"].ToString(),
                 PD_PROJECT_CODE = dt.Rows[i]["PD_PROJECT_CODE"].ToString(),
                 PD_PROJECT_NAME = dt.Rows[i]["PD_PROJECT_NAME"].ToString()
             };
             if (dt.Rows[i]["PD_YEAR"].ToString() != "")
             {
                 item.PD_YEAR = new int?(int.Parse(dt.Rows[i]["PD_YEAR"].ToString()));
             }
             item.PD_PROJECT_TYPE = dt.Rows[i]["PD_PROJECT_TYPE"].ToString();
             item.PD_GK_DEPART = dt.Rows[i]["PD_GK_DEPART"].ToString();
             item.PD_FOUND_XZ = dt.Rows[i]["PD_FOUND_XZ"].ToString();
             if (dt.Rows[i]["PD_PROJECT_IFGS"].ToString() != "")
             {
                 item.PD_PROJECT_IFGS = new int?(int.Parse(dt.Rows[i]["PD_PROJECT_IFGS"].ToString()));
             }
             if (dt.Rows[i]["PD_PROJECT_IFGS_BEFORE"].ToString() != "")
             {
                 item.PD_PROJECT_IFGS_BEFORE = new int?(int.Parse(dt.Rows[i]["PD_PROJECT_IFGS_BEFORE"].ToString()));
             }
             item.PD_PROJECT_OPEN_BODY = dt.Rows[i]["PD_PROJECT_OPEN_BODY"].ToString();
             item.PD_PROJECT_STATUS = dt.Rows[i]["PD_PROJECT_STATUS"].ToString();
             item.PD_PROJECT_FILENO_JG = dt.Rows[i]["PD_PROJECT_FILENO_JG"].ToString();
             item.PD_PROJECT_INPUT_COMPANY = dt.Rows[i]["PD_PROJECT_INPUT_COMPANY"].ToString();
             item.PD_PROJECT_INPUT_MAN = dt.Rows[i]["PD_PROJECT_INPUT_MAN"].ToString();
             item.PD_PROJECT_INPUT_DATE = dt.Rows[i]["PD_PROJECT_INPUT_DATE"].ToString();
             item.PD_PROJECT_BZYJ = dt.Rows[i]["PD_PROJECT_BZYJ"].ToString();
             item.PD_PROJECT_BZFW = dt.Rows[i]["PD_PROJECT_BZFW"].ToString();
             item.PD_PROJECT_BZDX = dt.Rows[i]["PD_PROJECT_BZDX"].ToString();
             if (dt.Rows[i]["PD_PROJECT_BZNUM"].ToString() != "")
             {
                 item.PD_PROJECT_BZNUM = new decimal?(decimal.Parse(dt.Rows[i]["PD_PROJECT_BZNUM"].ToString()));
             }
             item.PD_PROJECT_BZSTAND_NUM = dt.Rows[i]["PD_PROJECT_BZSTAND_NUM"].ToString();
             if (dt.Rows[i]["PD_PROJECT_BZMONEY"].ToString() != "")
             {
                 item.PD_PROJECT_BZMONEY = new decimal?(decimal.Parse(dt.Rows[i]["PD_PROJECT_BZMONEY"].ToString()));
             }
             if (dt.Rows[i]["PD_PROJECT_BZFF_DATE"].ToString() != "")
             {
                 item.PD_PROJECT_BZFF_DATE = new DateTime?(DateTime.Parse(dt.Rows[i]["PD_PROJECT_BZFF_DATE"].ToString()));
             }
             if (dt.Rows[i]["PD_PROJECT_SJFF_DATE"].ToString() != "")
             {
                 item.PD_PROJECT_SJFF_DATE = new DateTime?(DateTime.Parse(dt.Rows[i]["PD_PROJECT_SJFF_DATE"].ToString()));
             }
             if (dt.Rows[i]["PD_PROJECT_IFFF"].ToString() != "")
             {
                 item.PD_PROJECT_IFFF = new int?(int.Parse(dt.Rows[i]["PD_PROJECT_IFFF"].ToString()));
             }
             item.PD_PROJECT_JGYQ = dt.Rows[i]["PD_PROJECT_JGYQ"].ToString();
             item.PD_PROJECT_JGJL = dt.Rows[i]["PD_PROJECT_JGJL"].ToString();
             item.PD_PROJECT_JG_RESULT = dt.Rows[i]["PD_PROJECT_JG_RESULT"].ToString();
             list.Add(item);
         }
     }
     return list;
 }
Ejemplo n.º 6
0
 public void Add(TB_PROJECT_BZ_Model model)
 {
     this.dal.Add(model);
 }
Ejemplo n.º 7
0
 public bool Update(TB_PROJECT_BZ_Model model)
 {
     return this.dal.Update(model);
 }