/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; bpms_qynumber = ControlBindHelper.GetWebControls <BPMS_QYNumber>(this.Page); if (!string.IsNullOrEmpty(_key))//判断是否编辑 { bpms_qynumber.QYId = _key; //bpms_qynumber.ModifyDate = DateTime.Now; //bpms_qynumber.ModifyUserId = RequestSession.GetSessionUser().UserId.ToString(); //bpms_qynumber.ModifyUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = bpms_qynumberibll.Update(bpms_qynumber); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { bpms_qynumber.QYId = CommonHelper.GetGuid; bpms_qynumber.CreateUserId = RequestSession.GetSessionUser().UserId.ToString(); bpms_qynumber.CreateUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = bpms_qynumberibll.Insert(bpms_qynumber); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
/// <summary> /// 得到一个对象实体 /// </summary> public void InitControl() { if (!string.IsNullOrEmpty(_key)) { bpms_qynumber = bpms_qynumberibll.GetEntity(_key); ControlBindHelper.SetWebControls(this.Page, bpms_qynumber); } }
/// <summary> /// 更新一条数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public bool Update(BPMS_QYNumber entity) { return(dal.Update(entity) >= 0 ? true : false); }
/// <summary> /// 增加一条数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public bool Insert(BPMS_QYNumber entity) { return(dal.Insert(entity) >= 0 ? true : false); }
/// <summary> /// 更新一条数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public int Update(BPMS_QYNumber entity) { return(DataFactory.DbUtils().Update(entity, "QYId")); }
/// <summary> /// 增加一条数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public int Insert(BPMS_QYNumber entity) { return(DataFactory.DbUtils().Insert(entity)); }