예제 #1
0
 public List<PD_PROJECT_ZTB_Model> DataTableToList(DataTable dt)
 {
     List<PD_PROJECT_ZTB_Model> list = new List<PD_PROJECT_ZTB_Model>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             PD_PROJECT_ZTB_Model item = new PD_PROJECT_ZTB_Model {
                 AUTO_NO = dt.Rows[i]["AUTO_NO"].ToString(),
                 PD_PROJECT_CODE = dt.Rows[i]["PD_PROJECT_CODE"].ToString()
             };
             if (dt.Rows[i]["PD_PROJECT_ZTB_IF_SSFA"].ToString() != "")
             {
                 item.PD_PROJECT_ZTB_IF_SSFA = new int?(int.Parse(dt.Rows[i]["PD_PROJECT_ZTB_IF_SSFA"].ToString()));
             }
             if (dt.Rows[i]["PD_PROJECT_ZTB_IF_ZTB"].ToString() != "")
             {
                 item.PD_PROJECT_ZTB_IF_ZTB = new int?(int.Parse(dt.Rows[i]["PD_PROJECT_ZTB_IF_ZTB"].ToString()));
             }
             if (dt.Rows[i]["PD_PROJECT_ZTB_IF_WCFB"].ToString() != "")
             {
                 item.PD_PROJECT_ZTB_IF_WCFB = new int?(int.Parse(dt.Rows[i]["PD_PROJECT_ZTB_IF_WCFB"].ToString()));
             }
             item.PD_PROJECT_ZTB_STYLE = dt.Rows[i]["PD_PROJECT_ZTB_STYLE"].ToString();
             item.PD_PROJECT_ZTB_FILE = dt.Rows[i]["PD_PROJECT_ZTB_FILE"].ToString();
             item.PD_PROJECT_ZTB_FILE_SYSTEM = dt.Rows[i]["PD_PROJECT_ZTB_FILE_SYSTEM"].ToString();
             list.Add(item);
         }
     }
     return list;
 }
예제 #2
0
 public void Add(PD_PROJECT_ZTB_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into PD_PROJECT_ZTB(");
     builder.Append("AUTO_NO,PD_PROJECT_CODE,PD_PROJECT_ZTB_IF_SSFA,PD_PROJECT_ZTB_IF_ZTB,PD_PROJECT_ZTB_IF_WCFB,PD_PROJECT_ZTB_STYLE,PD_PROJECT_ZTB_FILE,PD_PROJECT_ZTB_FILE_SYSTEM,PD_PROJECT_ISCONTRACT,PD_PROJECT_XXJD,PD_PROJECT_FCXMGCL,PD_PROJECT_GCZLQK)");
     builder.Append(" values (");
     builder.Append(":AUTO_NO,:PD_PROJECT_CODE,:PD_PROJECT_ZTB_IF_SSFA,:PD_PROJECT_ZTB_IF_ZTB,:PD_PROJECT_ZTB_IF_WCFB,:PD_PROJECT_ZTB_STYLE,:PD_PROJECT_ZTB_FILE,:PD_PROJECT_ZTB_FILE_SYSTEM,:PD_PROJECT_ISCONTRACT,:PD_PROJECT_XXJD,:PD_PROJECT_FCXMGCL,:PD_PROJECT_GCZLQK)");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":AUTO_NO", OracleType.Char, 0x24), new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24), new OracleParameter(":PD_PROJECT_ZTB_IF_SSFA", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_ZTB_IF_ZTB", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_ZTB_IF_WCFB", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_ZTB_STYLE", OracleType.VarChar, 30), new OracleParameter(":PD_PROJECT_ZTB_FILE", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ZTB_FILE_SYSTEM", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ISCONTRACT", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_XXJD", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_FCXMGCL", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_GCZLQK", OracleType.VarChar, 50) };
     cmdParms[0].Value = Guid.NewGuid().ToString();
     cmdParms[1].Value = model.PD_PROJECT_CODE;
     cmdParms[2].Value = model.PD_PROJECT_ZTB_IF_SSFA;
     cmdParms[3].Value = model.PD_PROJECT_ZTB_IF_ZTB;
     cmdParms[4].Value = model.PD_PROJECT_ZTB_IF_WCFB;
     cmdParms[5].Value = model.PD_PROJECT_ZTB_STYLE;
     cmdParms[6].Value = model.PD_PROJECT_ZTB_FILE;
     cmdParms[7].Value = model.PD_PROJECT_ZTB_FILE_SYSTEM;
     cmdParms[8].Value = model.PD_PROJECT_ISCONTRACT;
     cmdParms[9].Value = model.PD_PROJECT_XXJD;
     cmdParms[10].Value = model.PD_PROJECT_FCXMGCL;
     cmdParms[11].Value = model.PD_PROJECT_GCZLQK;
     DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
 }
예제 #3
0
 public PD_PROJECT_ZTB_Model GetModel(string AUTO_NO)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select AUTO_NO,PD_PROJECT_CODE,PD_PROJECT_ZTB_IF_SSFA,PD_PROJECT_ZTB_IF_ZTB,PD_PROJECT_ZTB_IF_WCFB,PD_PROJECT_ZTB_STYLE,PD_PROJECT_ZTB_FILE,PD_PROJECT_ZTB_FILE_SYSTEM,PD_PROJECT_ISCONTRACT,PD_PROJECT_XXJD,PD_PROJECT_FCXMGCL,PD_PROJECT_GCZLQK from PD_PROJECT_ZTB ");
     builder.Append(" where AUTO_NO=:AUTO_NO ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":AUTO_NO", OracleType.Char, 50) };
     cmdParms[0].Value = AUTO_NO;
     PD_PROJECT_ZTB_Model model = new PD_PROJECT_ZTB_Model();
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     model.AUTO_NO = set.Tables[0].Rows[0]["AUTO_NO"].ToString();
     model.PD_PROJECT_CODE = set.Tables[0].Rows[0]["PD_PROJECT_CODE"].ToString();
     if (set.Tables[0].Rows[0]["PD_PROJECT_ZTB_IF_SSFA"].ToString() != "")
     {
         model.PD_PROJECT_ZTB_IF_SSFA = new int?(int.Parse(set.Tables[0].Rows[0]["PD_PROJECT_ZTB_IF_SSFA"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_PROJECT_ZTB_IF_ZTB"].ToString() != "")
     {
         model.PD_PROJECT_ZTB_IF_ZTB = new int?(int.Parse(set.Tables[0].Rows[0]["PD_PROJECT_ZTB_IF_ZTB"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_PROJECT_ZTB_IF_WCFB"].ToString() != "")
     {
         model.PD_PROJECT_ZTB_IF_WCFB = new int?(int.Parse(set.Tables[0].Rows[0]["PD_PROJECT_ZTB_IF_WCFB"].ToString()));
     }
     model.PD_PROJECT_ZTB_STYLE = set.Tables[0].Rows[0]["PD_PROJECT_ZTB_STYLE"].ToString();
     model.PD_PROJECT_ZTB_FILE = set.Tables[0].Rows[0]["PD_PROJECT_ZTB_FILE"].ToString();
     model.PD_PROJECT_ZTB_FILE_SYSTEM = set.Tables[0].Rows[0]["PD_PROJECT_ZTB_FILE_SYSTEM"].ToString();
     model.PD_PROJECT_ISCONTRACT = set.Tables[0].Rows[0]["PD_PROJECT_ISCONTRACT"].ToString();
     model.PD_PROJECT_XXJD = set.Tables[0].Rows[0]["PD_PROJECT_XXJD"].ToString();
     model.PD_PROJECT_FCXMGCL = set.Tables[0].Rows[0]["PD_PROJECT_FCXMGCL"].ToString();
     model.PD_PROJECT_GCZLQK = set.Tables[0].Rows[0]["PD_PROJECT_GCZLQK"].ToString();
     return model;
 }
예제 #4
0
 public bool Update(PD_PROJECT_ZTB_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update PD_PROJECT_ZTB set ");
     builder.Append("PD_PROJECT_CODE=:PD_PROJECT_CODE,");
     builder.Append("PD_PROJECT_ZTB_IF_SSFA=:PD_PROJECT_ZTB_IF_SSFA,");
     builder.Append("PD_PROJECT_ZTB_IF_ZTB=:PD_PROJECT_ZTB_IF_ZTB,");
     builder.Append("PD_PROJECT_ZTB_IF_WCFB=:PD_PROJECT_ZTB_IF_WCFB,");
     builder.Append("PD_PROJECT_ZTB_STYLE=:PD_PROJECT_ZTB_STYLE,");
     builder.Append("PD_PROJECT_ZTB_FILE=:PD_PROJECT_ZTB_FILE,");
     builder.Append("PD_PROJECT_ZTB_FILE_SYSTEM=:PD_PROJECT_ZTB_FILE_SYSTEM,");
     builder.Append("PD_PROJECT_ISCONTRACT=:PD_PROJECT_ISCONTRACT,");
     builder.Append("PD_PROJECT_XXJD=:PD_PROJECT_XXJD,");
     builder.Append("PD_PROJECT_FCXMGCL=:PD_PROJECT_FCXMGCL,");
     builder.Append("PD_PROJECT_GCZLQK=:PD_PROJECT_GCZLQK");
     builder.Append(" where AUTO_NO=:AUTO_NO ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24), new OracleParameter(":PD_PROJECT_ZTB_IF_SSFA", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_ZTB_IF_ZTB", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_ZTB_IF_WCFB", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_ZTB_STYLE", OracleType.VarChar, 30), new OracleParameter(":PD_PROJECT_ZTB_FILE", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ZTB_FILE_SYSTEM", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ISCONTRACT", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_XXJD", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_FCXMGCL", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_GCZLQK", OracleType.VarChar, 50), new OracleParameter(":AUTO_NO", OracleType.Char, 0x24) };
     cmdParms[0].Value = model.PD_PROJECT_CODE;
     cmdParms[1].Value = model.PD_PROJECT_ZTB_IF_SSFA;
     cmdParms[2].Value = model.PD_PROJECT_ZTB_IF_ZTB;
     cmdParms[3].Value = model.PD_PROJECT_ZTB_IF_WCFB;
     cmdParms[4].Value = model.PD_PROJECT_ZTB_STYLE;
     cmdParms[5].Value = model.PD_PROJECT_ZTB_FILE;
     cmdParms[6].Value = model.PD_PROJECT_ZTB_FILE_SYSTEM;
     cmdParms[7].Value = model.PD_PROJECT_ISCONTRACT;
     cmdParms[8].Value = model.PD_PROJECT_XXJD;
     cmdParms[9].Value = model.PD_PROJECT_FCXMGCL;
     cmdParms[10].Value = model.PD_PROJECT_GCZLQK;
     cmdParms[11].Value = model.AUTO_NO;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
예제 #5
0
 public void Add(PD_PROJECT_ZTB_Model model)
 {
     this.dal.Add(model);
 }
예제 #6
0
 public bool Update(PD_PROJECT_ZTB_Model model)
 {
     return this.dal.Update(model);
 }
예제 #7
0
 private PD_PROJECT_ZTB_Model GetModel_Ztb(PD_PROJECT_ZTB_Model model, string PD_PROJECT_CODE)
 {
     if (model == null)
     {
         model = new PD_PROJECT_ZTB_Model();
     }
     if (PublicDal.PageValidate.IsInt(this.ddlPD_PROJECT_ZTB_IF_SSFA.SelectedValue))
     {
         model.PD_PROJECT_ZTB_IF_SSFA = new int?(int.Parse(this.ddlPD_PROJECT_ZTB_IF_SSFA.SelectedValue));
     }
     if (PublicDal.PageValidate.IsInt(this.ddlPD_PROJECT_ZTB_IF_ZTB.SelectedValue))
     {
         model.PD_PROJECT_ZTB_IF_ZTB = new int?(int.Parse(this.ddlPD_PROJECT_ZTB_IF_ZTB.SelectedValue));
     }
     model.PD_PROJECT_ZTB_STYLE = this.ddlPD_PROJECT_ZTB_STYLE.SelectedValue;
     model.PD_PROJECT_CODE = PD_PROJECT_CODE;
     model.PD_PROJECT_ISCONTRACT = this.ddlPD_PROJECT_ISCONTRACT.SelectedValue;
     model.PD_PROJECT_XXJD = this.txtPD_PROJECT_XXJD.Text;
     model.PD_PROJECT_FCXMGCL = this.txtPD_PROJECT_FCXMGCL.Text;
     model.PD_PROJECT_GCZLQK = this.txtPD_PROJECT_GCZLQK.Text;
     return model;
 }
예제 #8
0
 private void GetZtbModel(ref PD_PROJECT_ZTB_Model model, string PD_PROJECT_CODE, ref string strErr)
 {
     if (!PageValidate.IsNumber(this.ddlPD_PROJECT_ZTB_IF_SSFA.SelectedValue))
     {
         strErr = strErr + @"是否完成实施方案编制格式错误!\n";
     }
     if (!PageValidate.IsNumber(this.ddlPD_PROJECT_ZTB_IF_ZTB.SelectedValue))
     {
         strErr = strErr + @"是否招投标格式错误!\n";
     }
     if (this.ddlPD_PROJECT_ZTB_STYLE.SelectedValue.Trim().Length == 0)
     {
         strErr = strErr + @"招标方式不能为空!\n";
     }
     if (strErr != "")
     {
         model = null;
     }
     else
     {
         int num = int.Parse(this.ddlPD_PROJECT_ZTB_IF_SSFA.SelectedValue);
         int num2 = int.Parse(this.ddlPD_PROJECT_ZTB_IF_ZTB.SelectedValue);
         string selectedValue = this.ddlPD_PROJECT_ZTB_STYLE.SelectedValue;
         model.PD_PROJECT_CODE = PD_PROJECT_CODE;
         model.PD_PROJECT_ZTB_IF_SSFA = new int?(num);
         model.PD_PROJECT_ZTB_IF_ZTB = new int?(num2);
         model.PD_PROJECT_ZTB_STYLE = selectedValue;
         model.PD_PROJECT_ISCONTRACT = this.ddlPD_PROJECT_ISCONTRACT.SelectedValue;
         model.PD_PROJECT_XXJD = this.txtPD_PROJECT_XXJD.Text;
         model.PD_PROJECT_FCXMGCL = this.txtPD_PROJECT_FCXMGCL.Text;
         model.PD_PROJECT_GCZLQK = this.txtPD_PROJECT_GCZLQK.Text;
     }
 }
예제 #9
0
 private bool GetModel(string PD_PROJECT_CODE, ref List<PD_CONTRACT_CHANGE_Model> CHANGE_Model, ref List<PD_PROJECT_ATTACH_SS_Model> SS_Model, ref List<PD_PROJECT_CONTRACT_Model> CONTRACT_Model, ref List<PD_PROJECT_INSPECTION_Model> INSPECTION_Model, ref List<PD_PROJECT_MONITOR_Model> MONITOR_Model, ref PD_PROJECT_ZTB_Model ZTB_Model, ref string errText)
 {
     SS_Model = this.GetAttach_SSModel(PD_PROJECT_CODE, ref errText);
     if (SS_Model == null)
     {
         this.TabContainer1.ActiveTabIndex = 4;
         return false;
     }
     this.GetZtbModel(ref ZTB_Model, PD_PROJECT_CODE, ref errText);
     if (ZTB_Model == null)
     {
         this.TabContainer1.ActiveTabIndex = 1;
         return false;
     }
     return true;
 }
예제 #10
0
 private void UpdataData(string PD_PROJECT_CODE)
 {
     List<PD_CONTRACT_CHANGE_Model> list = null;
     List<PD_PROJECT_ATTACH_SS_Model> list2 = null;
     List<PD_PROJECT_CONTRACT_Model> list3 = null;
     List<PD_PROJECT_INSPECTION_Model> list4 = null;
     List<PD_PROJECT_MONITOR_Model> list5 = null;
     PD_PROJECT_ZTB_Model model = new PD_PROJECT_ZTB_Model();
     string errText = "";
     if (!this.GetModel(PD_PROJECT_CODE, ref list, ref list2, ref list3, ref list4, ref list5, ref model, ref errText))
     {
         this.hy_File(list2, list3, list, list5, list4, errText);
     }
     else
     {
         PD_PROJECT_ATTACH_SS_Bll bll = new PD_PROJECT_ATTACH_SS_Bll();
         bll.Delete(PD_PROJECT_CODE);
         bll.AddList(list2);
         PD_PROJECT_ZTB_Bll bll2 = new PD_PROJECT_ZTB_Bll();
         bll2.DeletePROJECT(PD_PROJECT_CODE);
         bll2.Add(model);
         TB_PROJECT_Bll bll3 = new TB_PROJECT_Bll();
         TB_PROJECT_Model model2 = new TB_PROJECT_Model
         {
             PD_PROJECT_CODE = PD_PROJECT_CODE,
             PD_PROJECT_JGJL = this.PD_PROJECT_JGJL.Text,
             PD_PROJECT_JG_RESULT = this.PD_PROJECT_JG_RESULT.Text,
             PD_PROJECT_JG_SUGGEST = this.PD_PROJECT_JG_SUGGEST.Text
         };
         bll3.UpdateJGJL(model2);
         PageShowText.Refurbish("修改成功", this.Page);
     }
 }