/// <summary>
        /// 确认事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Accept_Click(object sender, EventArgs e)
        {
            bool IsOk = false;

            bpms_interfaceaccess         = ControlBindHelper.GetWebControls <BPMS_InterfaceAccess>(this.Page);
            bpms_interfaceaccess.Enabled = Enabled.Checked ? 1 : 0;
            if (!string.IsNullOrEmpty(_key))//判断是否编辑
            {
                bpms_interfaceaccess.IAccessId      = _key;
                bpms_interfaceaccess.ModifyDate     = DateTime.Now;
                bpms_interfaceaccess.ModifyUserId   = RequestSession.GetSessionUser().UserId;
                bpms_interfaceaccess.ModifyUserName = RequestSession.GetSessionUser().UserName;
                IsOk = bpms_interfaceaccessibll.Update(bpms_interfaceaccess);
                if (IsOk)
                {
                    ShowMsgHelper.AlertCallback(MessageHelper.MSG0006);
                }
            }
            else
            {
                bpms_interfaceaccess.IAccessId      = CommonHelper.GetGuid;
                bpms_interfaceaccess.CreateUserId   = RequestSession.GetSessionUser().UserId;
                bpms_interfaceaccess.CreateUserName = RequestSession.GetSessionUser().UserName;
                IsOk = bpms_interfaceaccessibll.Insert(bpms_interfaceaccess);
                if (IsOk)
                {
                    ShowMsgHelper.AlertCallback(MessageHelper.MSG0005);
                }
            }
            if (!IsOk)
            {
                ShowMsgHelper.Alert_Error(MessageHelper.MSG0022);
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public void InitControl()
 {
     if (!string.IsNullOrEmpty(_key))
     {
         bpms_interfaceaccess = bpms_interfaceaccessibll.GetEntity(_key);
         ControlBindHelper.SetWebControls(this.Page, bpms_interfaceaccess);
     }
 }
Beispiel #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="entity">实体类</param>
        /// <returns></returns>
        public int Insert(BPMS_InterfaceAccess entity)
        {
            int IsOk = DataFactory.DbUtils().Insert(entity);

            #region 写日操作日志
            if (IsOk > 0)
            {
                BPMS_SysLogDAL.Instance.AddTaskLog <BPMS_InterfaceAccess>(entity, RequestSession.GetSessionUser().UserId, RequestSession.GetSessionUser().UserName);
            }
            #endregion
            return(IsOk);
        }
Beispiel #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public int Update(BPMS_InterfaceAccess entity)
 {
     #region 获取旧值
     var oldEntity = this.GetEntity(BPMS_SysLogDAL.Instance.GetKeyFieldValue <BPMS_InterfaceAccess>(entity).ToString());
     #endregion
     int IsOk = DataFactory.DbUtils().Update(entity, "IAccessId");
     #region 写日操作日志
     if (IsOk > 0)
     {
         BPMS_SysLogDAL.Instance.UpdateTaskLog <BPMS_InterfaceAccess>(oldEntity, entity, RequestSession.GetSessionUser().UserId, RequestSession.GetSessionUser().UserName);
     }
     #endregion
     return(IsOk);
 }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public bool Update(BPMS_InterfaceAccess entity)
 {
     return(dal.Update(entity) >= 0 ? true : false);
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public bool Insert(BPMS_InterfaceAccess entity)
 {
     return(dal.Insert(entity) >= 0 ? true : false);
 }