Example #1
0
 private bool EnableAndDisableLeaveType(string LvTypeCode, string EffectFlag, SynclogModel logmodel)
 {
     LeaveTypeModel leaveTypeModel = new LeaveTypeModel();
     leaveTypeModel.LvTypeCode = LvTypeCode;
     leaveTypeModel.EffectFlag = EffectFlag;
     return leaveTypeBll.EnableAndDisableLeaveType(leaveTypeModel, logmodel);
 }
Example #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     LeaveTypeModel leaveTypeModel =null;
     string alert = "";
     if (hidOperate.Value == "Add")
     {
         logmodel.ProcessFlag = "insert";
         leaveTypeModel = PageHelper.GetModel<LeaveTypeModel>(inputPanel.Controls);
         leaveTypeModel.Modifier =CurrentUserInfo.Personcode;
         if (leaveTypeBll.AddLeaveType(leaveTypeModel, logmodel))
         {
             alert = "alert('" + Message.AddSuccess + "')";
         }
         else
         {
             alert = "alert('" + Message.AddFailed + "')";
         }
     }
     else if (hidOperate.Value == "Modify")
     {
         logmodel.ProcessFlag = "update";
         leaveTypeModel = PageHelper.GetModel<LeaveTypeModel>(inputPanel.Controls, hidEffectFlag);
         leaveTypeModel.Modifier = CurrentUserInfo.Personcode;
         if (leaveTypeBll.UpDateLeaveType(leaveTypeModel, logmodel))
         {
             alert = "alert('" + Message.UpdateSuccess + "')";
         }
         else
         {
             alert = "alert('" + Message.UpdateFailed + "')";
         }
     }
     ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "addAndUpDateLeaveType", alert, true);
     PageHelper.CleanControlsValue(inputPanel.Controls);
     DataBind();
 }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageHelper.ButtonControls(FuncList, pnlShowPanel.Controls, base.FuncListModule);
            if (ClientMessage == null)
            {
                ClientMessage = new Dictionary<string, string>();
                ClientMessage.Add("LvTypeExist", Message.LvTypeExist);
                ClientMessage.Add("AtLastOneChoose", Message.AtLastOneChoose);
                ClientMessage.Add("DeleteAttTypeConfirm", Message.DeleteAttTypeConfirm);
            }
            if (!base.IsPostBack)
            {
                logmodel.ProcessOwner = CurrentUserInfo.Personcode;
                logmodel.TransactionType = Request.QueryString["ModuleCode"] == null ? "" : Request.QueryString["ModuleCode"].ToString();
                logmodel.LevelNo = "2";
                logmodel.FromHost = Request.UserHostAddress;

                pager.CurrentPageIndex = 1;
                leaveTypeModel = new LeaveTypeModel();
                DataBind();
            }
            string clientmsg = JsSerializer.Serialize(ClientMessage);
            Page.ClientScript.RegisterStartupScript(GetType(), "ClientMessage", "var Message=" + clientmsg + ";", true);
        }
Example #4
0
 protected void btnQuery_Click(object sender, EventArgs e)
 {
     leaveTypeModel = PageHelper.GetModel<LeaveTypeModel>(inputPanel.Controls, hidEffectFlag);
     pager.CurrentPageIndex = 1;
     DataBind();
     PageHelper.CleanControlsValue(inputPanel.Controls);
     ProcessFlag.Value = "N";
 }