Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Cookies[ApplicationMode + "payrollCookie_" + UserAccount.UserID] != null)
                {
                    ctlDropDownMonth.SelectedValue = Server.HtmlEncode(Request.Cookies[ApplicationMode + "payrollCookie_" + UserAccount.UserID]["month"]);
                    ctlTextboxYear.Text            = Server.HtmlEncode(Request.Cookies[ApplicationMode + "payrollCookie_" + UserAccount.UserID]["year"]);
                    txtCompanyList.Text            = Server.HtmlEncode(Request.Cookies[ApplicationMode + "payrollCookie_" + UserAccount.UserID]["CompanyList"]);
                    rblPersonalLevel.SelectedValue = Server.HtmlEncode(Request.Cookies[ApplicationMode + "payrollCookie_" + UserAccount.UserID]["PersonalLevel"]);
                }
                else
                {
                    rblPersonalLevel.SelectedIndex = 2;
                    SelectPreviouseMonthAndYear();
                }

                if (!string.IsNullOrEmpty(Request.QueryString["exportType"]))
                {
                    if (Request.QueryString["exportType"].Equals("text"))
                    {
                        this.ExportPayrollTextFile();
                    }
                    else if (Request.QueryString["exportType"].Equals("pdf"))
                    {
                        this.ExportPayrollPDF();
                    }
                }
                UpdatePanelPayrollCriteria.Update();
            }
        }
Example #2
0
 protected void btnAddCompany_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(ctlCompanyTextboxAutoComplete1.CompanyCode))
     {
         if (string.IsNullOrEmpty(txtCompanyList.Text))
         {
             txtCompanyList.Text += ctlCompanyTextboxAutoComplete1.CompanyCode;
         }
         else
         {
             txtCompanyList.Text += "," + ctlCompanyTextboxAutoComplete1.CompanyCode;
         }
     }
     ctlCompanyTextboxAutoComplete1.ResetValue();
     UpdatePanelPayrollCriteria.Update();
 }