protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeSession();
     }
 }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeSession();
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (eventTarget == "SearchShiftRule")
             {
                 ASL.Hr.DAO.ShiftRule searchShiftRule = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as ASL.Hr.DAO.ShiftRule;
                 ShiftRuleMasterList = new CustomList <ASL.Hr.DAO.ShiftRule>();
                 ShiftRuleMasterList.Add(searchShiftRule);
                 if (searchShiftRule.IsNotNull())
                 {
                     PopulateShiftRuleInfo(searchShiftRule);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             //InitializeCombo();
             InitializeSession();
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (Request["__EVENTTARGET"] == "SearchLoanType")
             {
                 LoanTypeList = new CustomList <ASL.Hr.DAO.LoanType>();
                 ASL.Hr.DAO.LoanType searchLoan = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as ASL.Hr.DAO.LoanType;
                 LoanTypeList.Add(searchLoan);
                 if (searchLoan.IsNotNull())
                 {
                     PopulateBankInformation(searchLoan);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeCombo();
             InitializeSession();
             ddlCurrencyID.SelectedValue = "1";
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (Request["__EVENTTARGET"] == "SearchPO")
             {
                 POMasterList = new CustomList <POMaster>();
                 POMaster searchPOMaster = Session[STATIC.StaticInfo.SearchSessionVarName] as POMaster;
                 POMasterList.Add(searchPOMaster);
                 PopulatePO(searchPOMaster);
             }
         }
         TransRef.DocListID = 258;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (IsPostBack.IsFalse())
                {
                    InitializieCombo();

                    ClearControls();
                    InitializeSession();
                    EnableAllControls(false);
                }
                else
                {
                    Page.ClientScript.GetPostBackEventReference(this, String.Empty);
                    String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
                    if (Request["__EVENTTARGET"] == "SearchGroup")
                    {
                        Group searchGroup = Session[STATIC.StaticInfo.SearchSessionVarName] as Group;
                        groupList.Add(searchGroup);
                        SearchGroupList = groupList;
                        if (searchGroup.IsNotNull())
                        {
                            PopulateGroupInformation(searchGroup);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeCombo();
             InitializeSession();
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (Request["__EVENTTARGET"] == "SearchCmnDocListTableMapping")
             {
                 TransactionReferenceList = new CustomList <CmnDocListTableMapping>();
                 CmnDocListTableMapping searchCmnDocListTableMapping = Session[STATIC.StaticInfo.SearchSessionVarName] as CmnDocListTableMapping;
                 TransactionReferenceList.Add(searchCmnDocListTableMapping);
                 if (searchCmnDocListTableMapping.IsNotNull())
                 {
                     PopulateTransactionReferenceInformation(searchCmnDocListTableMapping);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack.IsFalse())
            {
                if (((PageBase)this.Page).CurrentUserSession.IsNull())
                {
                    HttpContext.Current.Response.Redirect("~/Security/Login.aspx?back_url=" + Server.UrlEncode(Request.Url.AbsoluteUri));
                }
                //Loding Application
                ddlDefalultApplication.DataSource     = manager.GetAllApplication();
                ddlDefalultApplication.DataTextField  = "ApplicationName";
                ddlDefalultApplication.DataValueField = "ApplicationID";
                ddlDefalultApplication.DataBind();
                ddlDefalultApplication.Items.Insert(0, new ListItem(String.Empty, String.Empty));
                ddlDefalultApplication.SelectedIndex = 0;

                UserProfileList = new CustomList <UserProfile>();
                UserProfileList = manager.GetAllUserProfile(CurrentUserSession.UserCode);
                if (UserProfileList.Count != 0)
                {
                    ddlTheme.SelectedValue = UserProfileList[0].ThemeName;
                    ddlDefalultApplication.SelectedValue = UserProfileList[0].DefaultAppID.ToString();
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeSession();
             hfCurrentUser.Value = CurrentUserSession.UserCode;
             txtFromDate.Text    = DateTime.Now.ToShortDateString();
             txtToDate.Text      = DateTime.Now.ToShortDateString();
             string   times = manager.GetBufferTime();
             string[] items = times.Split(',');
             if (items.Count() == 4)
             {
                 txtIntimeBuffer.Text       = items[0];
                 txtShiftOutTime.Text       = items[1];
                 txtLunchInBuffertime.Text  = items[2];
                 txtLunchOutBuffertime.Text = items[3];
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeCombo();
             InitializeSession();
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (Request["__EVENTTARGET"] == "SearchBonusPolicy")
             {
                 BonusPolicyMasterList = new CustomList <BonusPolicyMaster>();
                 BonusPolicyMaster searchBonusPolicyMaster = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as BonusPolicyMaster;
                 BonusPolicyMasterList.Add(searchBonusPolicyMaster);
                 if (searchBonusPolicyMaster.IsNotNull())
                 {
                     PopulateBonusPolicyInformation(searchBonusPolicyMaster);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeSession();
             InitializeCombo();
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (Request["__EVENTTARGET"] == "SearchItem")
             {
                 ItemMasterList = new CustomList <ItemMaster>();
                 ItemMaster searchItemMaster = Session[STATIC.StaticInfo.SearchSessionVarName] as ItemMaster;
                 ItemMasterList = manager.GetAllItemMasterByItemCode(searchItemMaster.ItemCode);
                 if (ItemMasterList.Count != 0)
                 {
                     PopulateItemMaster(ItemMasterList[0]);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack.IsFalse())
            {
                InitializeCombo();
            }
            else
            {
                Page.ClientScript.GetPostBackEventReference(this, String.Empty);
                String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
                if (eventTarget == "SearchEmployee")
                {
                    HRM_Emp searchEmp = Session[StaticInfo.SearchSessionVarName] as HRM_Emp;
                    if (searchEmp.IsNotNull())
                    {
                        txtEmployeeName.Text = searchEmp.EmpName;
                        hfEmpKey.Value       = searchEmp.EmpKey.ToString();
                        txtBal.Text          = manager.GetBal(searchEmp.EmpKey).ToString();
                        txtCreditAmount.Text = txtBal.Text;

                        ddlReceiptFromAC_nc.DataSource     = manager.GetReceiptHeadList(searchEmp.EmpKey);
                        ddlReceiptFromAC_nc.DataTextField  = "COAName";
                        ddlReceiptFromAC_nc.DataValueField = "COAKey";
                        ddlReceiptFromAC_nc.DataBind();
                    }
                }
            }
        }
Esempio n. 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeSession();
         txtApproveBy_nc.Text = Enc.Decrypt(CurrentUserSession.UserName, ASL.STATIC.StaticInfo.encString);
     }
     else
     {
         Page.ClientScript.GetPostBackEventReference(this, String.Empty);
         String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
         if (eventTarget == "SearchSalaryRule")
         {
             SalaryRuleBackup searchSalaryRule = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as SalaryRuleBackup;
             if (searchSalaryRule.IsNotNull())
             {
                 txtSalaryRuleID.Text = searchSalaryRule.SalaryRuleCode;
                 grdSalaryRuleList    = manager.GetAllSalaryRuleBackup(searchSalaryRule.SalaryRuleCode);
                 if (grdSalaryRuleList.Count != 0)
                 {
                     chkApproved.Checked  = grdSalaryRuleList[0].IsApproved;
                     txtApprovalDate.Text = grdSalaryRuleList[0].ApprovalDate == DateTime.MinValue ? string.Empty : grdSalaryRuleList[0].ApprovalDate.ToShortDateString();
                     txtApproveBy_nc.Text = grdSalaryRuleList[0].ApproveBy;
                 }
             }
         }
     }
 }
Esempio n. 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             txtOTSlabID.Text    = StaticInfo.NewIDString;
             txtOTSlabID.Enabled = false;
             InitializeSession();
         }
         Page.ClientScript.GetPostBackEventReference(this, String.Empty);
         String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
         if (Request["__EVENTTARGET"] == "SearchOTSlab")
         {
             ASL.Hr.DAO.OTSlab searchOTSlab = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as ASL.Hr.DAO.OTSlab;
             if (searchOTSlab.IsNotNull())
             {
                 txtOTSlabID.Text = searchOTSlab.OTSlabID;
                 OTSlabList       = manager.GetAllOTSlab(searchOTSlab.OTSlabID);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (IsPostBack.IsFalse())
                {
                    ClientScript.RegisterClientScriptBlock(GetType(), "IsPostBack", "var isPostBack = true;", true);
                    InitializieCombo();

                    ClearControls();
                    InitializeSession();
                    //EnableAllControls(false);
                }
                else
                {
                    Page.ClientScript.GetPostBackEventReference(this, String.Empty);
                    String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
                    if (Request["__EVENTTARGET"] == "SearchHK")
                    {
                        HouseKeepingList = new CustomList <HouseKeepingValue>();
                        HouseKeepingValue searchHK = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as HouseKeepingValue;
                        HouseKeepingList.Add(searchHK);
                        if (searchHK.IsNotNull())
                        {
                            PopulateHKInformation(searchHK);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         Session["View_EmpList"] = new CustomList <HRM_Emp>();
     }
 }
Esempio n. 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeSession();
         PopulateDropdown();
     }
     else
     {
         Page.ClientScript.GetPostBackEventReference(this, String.Empty);
         String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
         if (Request["__EVENTTARGET"] == "SearchContactInfo")
         {
             ContactInfoList = new CustomList <ContactInfo>();
             ContactInfo searchContactInfo = Session[STATIC.StaticInfo.SearchSessionVarName] as ContactInfo;
             ContactInfoList.Add(searchContactInfo);
             if (searchContactInfo.IsNotNull())
             {
                 PopulateContactInfo(searchContactInfo);
                 ContactDetailList = manager.GetAllContactDetail(searchContactInfo.ContactID);
                 foreach (ContactDetail cD in ContactDetailList)
                 {
                     ContactType cT = ContactTypeList.Find(f => f.ContactTypeID == cD.ContactTypeID);
                     cT.IsChecked = true;
                 }
             }
         }
     }
 }
Esempio n. 17
0
 protected override void OnPreLoad(EventArgs e)
 {
     if (IsPostBack.IsFalse() && RequiresAuthorization)
     {
         GetFormAccess();
     }
     base.OnPreLoad(e);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         AttValidDataList = new CustomList <ATT_IO>();
         AttRejectedList  = new CustomList <ATT_IO>();
     }
 }
Esempio n. 19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         LatestNewsList = new CustomList <LatestNews>();
         LatestNewsList = _manager.GetAllLatestNews();
     }
 }
Esempio n. 20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeCombo();
         StockViewList = new CustomList <DAO.StockView>();
         StockViewList = manager.StockView1();
     }
 }
Esempio n. 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeCombo();
         InitializeSession();
         ddlRecipient_nc_SelectedIndexChanged(null, null);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                txtEmployeeName.Attributes.Add("readonly", "true");

                if (IsPostBack.IsFalse())
                {
                    InitializeCombo();
                }
                else
                {
                    Page.ClientScript.GetPostBackEventReference(this, String.Empty);
                    String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
                    if (Request["__EVENTTARGET"] == "SearchEmployee")
                    {
                        hfEmpCode.Value = "";
                        HRM_Emp searchEmp = Session[ASL.STATIC.StaticInfo.SearchSessionVarName] as HRM_Emp;
                        if (searchEmp.IsNotNull())
                        {
                            txtEmployeeName.Text = searchEmp.EmpName;
                            hfEmpCode.Value      = searchEmp.EmpCode;
                            txtEmpID.Text        = searchEmp.EmpCode;
                            hfEmpKey.Value       = searchEmp.EmpKey.ToString();

                            //added by zaki
                            //if (searchEmp.OrgKey > 0)
                            //{
                            //    string comKey = string.Empty, branKey = string.Empty, depKey = string.Empty;
                            //    GetAllOrgKey(searchEmp.OrgKey, out comKey, out branKey, out depKey);

                            //    ddlCompany.SelectedValue = comKey;
                            //    ddlCompany_SelectedIndexChanged(null, null);
                            //    ddlBranch.SelectedValue = ddlBranch.Items.FindByValue(branKey.ToString()) == null ? "" : branKey;
                            //    ddlBranch_SelectedIndexChanged(null, null);
                            //    ddlDepartment.SelectedValue = ddlDepartment.Items.FindByValue(depKey.ToString()) == null ? "" : depKey;
                            //}
                            //ddlGrade.SelectedValue = ddlGrade.Items.FindByValue(searchEmp.GradeKey.ToString()) == null ? "" : searchEmp.GradeKey.ToString();
                            //ddlGrade_SelectedIndexChanged(null, null);
                            //ddlDesignation.SelectedValue = ddlDesignation.Items.FindByValue(searchEmp.DesigKey.ToString()) == null ? "" : searchEmp.DesigKey.ToString();
                            //end zaki

                            StringBuilder searchString = SearchString();
                            Session[StaticInfo.SearchArg] = searchString;

                            string selectedEmpHeadline = string.Format("Employee Code: {0}. Employee Name: {1}", searchEmp.EmpCode, searchEmp.EmpName);
                            this.Page.ClientScript.RegisterStartupScript(this.GetType(), "loadEmp", string.Format("loadEmp('{0}','{1}')", searchEmp.EmpCode, selectedEmpHeadline), true);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         ProfitLossList = new CustomList <Acc_VoucherDet>();
         InitializeCombo();
         txtFromDate.Text = DateTime.Now.ToString(StaticInfo.GridDateFormatAcc);
         txtToDate.Text   = DateTime.Now.ToString(StaticInfo.GridDateFormatAcc);
     }
 }
Esempio n. 24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeCombo();
         VoucherList      = new CustomList <Acc_Voucher>();
         ChequeStatusList = new CustomList <AccChequeStatusList>();
         ChequeStatusList = manager.GetAllAccChequeStatusList();
     }
 }
Esempio n. 25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializieCombo();
         //ClearControls();
         InitializeSession();
         //EnableAllControls(false);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         PopulateControl();
         btnCancel.Visible  = false;
         btnDelete.Visible  = false;
         btnRefresh.Visible = false;
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeCombo();
         InitializeSession();
         #region Default Settings
         txtDate.Text = DateTime.UtcNow.ToString(ASL.STATIC.StaticInfo.GridDateFormat);
         #endregion
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         AttValidDataList = new CustomList <ATT_IO>();
         AttRejectedList  = new CustomList <ATT_IO>();
         if (DeviceSelected())
         {
             PopulateCombo();
         }
     }
 }
Esempio n. 29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeSession();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         //ClientScript.RegisterClientScriptBlock(GetType(), "IsPostBack", "var isPostBack = true;", true);
         InitializeSession();
         InitializeControl();
     }
     else
     {
         Page.ClientScript.GetPostBackEventReference(this, String.Empty);
         String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
     }
 }