public int Update(ContractPayendModel model) { StringBuilder builder = new StringBuilder(); builder.Append("update Con_ContractPayend set "); builder.Append("ContractID=@ContractID,"); builder.Append("BWasPerson=@BWasPerson,"); builder.Append("ProvisionMatter=@ProvisionMatter,"); builder.Append("ProjectCondition=@ProjectCondition,"); builder.Append("OtherExplain=@OtherExplain,"); builder.Append("Annex=@Annex,"); builder.Append("InPerson=@InPerson,"); builder.Append("InTime=@InTime,"); builder.Append("ModifyState=@ModifyState,"); builder.Append("WasPerson=@WasPerson,"); builder.Append("PayendTopics=@PayendTopics"); builder.Append(" where PayendID=@PayendID "); SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@PayendID", SqlDbType.NVarChar, 0x40), new SqlParameter("@ContractID", SqlDbType.NVarChar, 0x40), new SqlParameter("@BWasPerson", SqlDbType.NVarChar, 0x3e8), new SqlParameter("@ProvisionMatter", SqlDbType.NVarChar), new SqlParameter("@ProjectCondition", SqlDbType.NVarChar), new SqlParameter("@OtherExplain", SqlDbType.NVarChar), new SqlParameter("@Annex", SqlDbType.NVarChar, 200), new SqlParameter("@InPerson", SqlDbType.NVarChar, 0x40), new SqlParameter("@InTime", SqlDbType.DateTime), new SqlParameter("@ModifyState", SqlDbType.NVarChar, 5), new SqlParameter("@WasPerson", SqlDbType.NVarChar, 0x40), new SqlParameter("@PayendTopics", SqlDbType.NVarChar, 500) }; commandParameters[0].Value = model.PayendID; commandParameters[1].Value = model.ContractID; commandParameters[2].Value = model.BWasPerson; commandParameters[3].Value = model.ProvisionMatter; commandParameters[4].Value = model.ProjectCondition; commandParameters[5].Value = model.OtherExplain; commandParameters[6].Value = model.Annex; commandParameters[7].Value = model.InPerson; commandParameters[8].Value = model.InTime; commandParameters[9].Value = model.ModifyState; commandParameters[10].Value = model.WasPerson; commandParameters[11].Value = model.PayendTopics; return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters)); }
public ContractPayendModel GetModel(string PayendID) { StringBuilder builder = new StringBuilder(); builder.Append("select PayendID,ContractID,BWasPerson,ProvisionMatter,ProjectCondition,OtherExplain,Annex,InPerson,InTime,ModifyState,WasPerson,PayendTopics from Con_ContractPayend "); builder.Append(" where PayendID=@PayendID "); ContractPayendModel model = null; using (IDataReader reader = SqlHelper.ExecuteReader(CommandType.Text, builder.ToString(), new SqlParameter[] { new SqlParameter("@PayendID", PayendID) })) { if (reader.Read()) { model = this.ReaderBind(reader); } } return(model); }
public void InitPage() { ContractPayendModel model = this.contractPayendBll.GetModel(base.Request.QueryString["pid"]); this.lblBWasPerson.Text = this.GetUserName(model.BWasPerson); this.lblInputDate.Text = model.InTime.ToString(); this.lblInputPerson.Text = model.InPerson; this.lblOtherExplain.Text = model.OtherExplain; this.lblProjectCondition.Text = model.ProjectCondition; this.lblProvisionMatter.Text = model.ProvisionMatter; this.hdGuid.Value = model.PayendID; IncometContractModel model2 = this.incometContractBll.GetModel(model.ContractID); this.lblContractCode.Text = model2.ContractCode; this.lblContractName.Text = model2.ContractName; this.lblContractPrice.Text = model2.ContractPrice.ToString(); this.lblSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.hdContractId.Value = model2.ContractID; List <PayendFeedbackModel> listArray = this.payendFeedbackBll.GetListArray(string.Concat(new string[] { " where contractId='", model2.ContractID, "' and FeedbackPerson='", base.UserCode, "'" })); if (listArray.Count == 0) { this.lblTitle.Text = "新增收入合同交底反馈"; this.hdGuid.Value = Guid.NewGuid().ToString(); this.hdFeedbackState.Value = "1"; this.AddModel(); } else { this.hdFeedbackState.Value = "2"; this.lblTitle.Text = "修改收入合同交底反馈"; this.hdGuid.Value = listArray[0].ID; this.txtFeedback.Text = listArray[0].FeedbackOpinion; } this.FileLink1.MID = 1909; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public void InitPage() { if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑收入合同交底"; ContractPayendModel model = this.contractPayendBll.GetModel(base.Request.QueryString["id"]); this.txtBWasPerson.Text = this.GetUserName(model.BWasPerson); this.hdBWasPerson.Value = model.BWasPerson; this.txtInputDate.Text = model.InTime.ToString(); this.txtInputPerson.Text = model.InPerson; this.txtOtherExplain.Text = model.OtherExplain; this.txtProjectCondition.Text = model.ProjectCondition; this.txtProvisionMatter.Text = model.ProvisionMatter; this.txtPayendTopics.Text = model.PayendTopics; this.hdGuid.Value = model.PayendID; this.hdModifyState.Value = model.ModifyState; IncometContractModel model2 = this.incometContractBll.GetModel(model.ContractID); this.txtContractCode.Text = model2.ContractCode; this.txtContractName.Text = model2.ContractName; this.txtContractPrice.Text = model2.ContractPrice.ToString(); this.txtSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.hdContractId.Value = model2.ContractID; this.hdContractEditId.Value = model2.ContractID; } else { this.lblTitle.Text = "新增收入合同交底"; this.txtInputDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtInputPerson.Text = PageHelper.QueryUser(this, base.UserCode); this.hdGuid.Value = Guid.NewGuid().ToString(); this.hdModifyState.Value = "1"; } if (base.Request.QueryString["t"] != null) { this.lblTitle.Text = "查看收入合同交底"; } this.FileLink1.MID = 1909; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public void InitPage() { this.lblTitle.Text = "查看收入合同交底"; ContractPayendModel model = this.contractPayendBll.GetModel(base.Request.QueryString["id"]); this.lblBWasPerson.Text = this.GetUserName(model.BWasPerson); this.lblInputDate.Text = Common2.GetTime(model.InTime.ToString()); this.lblInputPerson.Text = model.InPerson; this.txtOtherExplain.Text = model.OtherExplain; this.txtProjectCondition.Text = model.ProjectCondition; this.txtProvisionMatter.Text = model.ProvisionMatter; this.hdGuid.Value = model.PayendID; IncometContractModel model2 = this.incometContractBll.GetModel(model.ContractID); this.lblContractCode.Text = model2.ContractCode; this.lblContractName.Text = model2.ContractName; this.lblContractPrice.Text = model2.ContractPrice.ToString(); this.lblSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.lblPayendTopics.Text = model.PayendTopics; this.FileLink1.MID = 1909; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public ContractPayendModel ReaderBind(IDataReader dataReader) { ContractPayendModel model = new ContractPayendModel { PayendID = dataReader["PayendID"].ToString(), ContractID = dataReader["ContractID"].ToString(), BWasPerson = dataReader["BWasPerson"].ToString(), ProvisionMatter = dataReader["ProvisionMatter"].ToString(), ProjectCondition = dataReader["ProjectCondition"].ToString(), OtherExplain = dataReader["OtherExplain"].ToString(), Annex = dataReader["Annex"].ToString(), InPerson = dataReader["InPerson"].ToString() }; object obj2 = dataReader["InTime"]; if ((obj2 != null) && (obj2 != DBNull.Value)) { model.InTime = new DateTime?((DateTime)obj2); } model.ModifyState = dataReader["ModifyState"].ToString(); model.WasPerson = dataReader["WasPerson"].ToString(); model.PayendTopics = dataReader["PayendTopics"].ToString(); return(model); }
public int Add(ContractPayendModel model) { StringBuilder builder = new StringBuilder(); builder.Append("insert into Con_ContractPayend("); builder.Append("PayendID,ContractID,BWasPerson,ProvisionMatter,ProjectCondition,OtherExplain,Annex,InPerson,InTime,ModifyState,WasPerson,PayendTopics)"); builder.Append(" values ("); builder.Append("@PayendID,@ContractID,@BWasPerson,@ProvisionMatter,@ProjectCondition,@OtherExplain,@Annex,@InPerson,@InTime,@ModifyState,@WasPerson,@PayendTopics)"); SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@PayendID", SqlDbType.NVarChar, 0x40), new SqlParameter("@ContractID", SqlDbType.NVarChar, 0x40), new SqlParameter("@BWasPerson", SqlDbType.NVarChar, 0x40), new SqlParameter("@ProvisionMatter", SqlDbType.NVarChar), new SqlParameter("@ProjectCondition", SqlDbType.NVarChar), new SqlParameter("@OtherExplain", SqlDbType.NVarChar), new SqlParameter("@Annex", SqlDbType.NVarChar, 200), new SqlParameter("@InPerson", SqlDbType.NVarChar, 0x40), new SqlParameter("@InTime", SqlDbType.DateTime), new SqlParameter("@ModifyState", SqlDbType.NVarChar, 5), new SqlParameter("@WasPerson", SqlDbType.NVarChar, 0x40), new SqlParameter("@PayendTopics", SqlDbType.NVarChar, 500) }; commandParameters[0].Value = model.PayendID; commandParameters[1].Value = model.ContractID; commandParameters[2].Value = model.BWasPerson; commandParameters[3].Value = model.ProvisionMatter; commandParameters[4].Value = model.ProjectCondition; commandParameters[5].Value = model.OtherExplain; commandParameters[6].Value = model.Annex; commandParameters[7].Value = model.InPerson; commandParameters[8].Value = model.InTime; commandParameters[9].Value = model.ModifyState; commandParameters[10].Value = model.WasPerson; commandParameters[11].Value = model.PayendTopics; return(SqlHelper.ExecuteNonQuery(CommandType.Text, builder.ToString(), commandParameters)); }
public int Update(ContractPayendModel model) { return(this.contractPayend.Update(model)); }
public int Add(ContractPayendModel model) { return(this.contractPayend.Add(model)); }