예제 #1
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;
                 }
             }
         }
     }
 }
예제 #2
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;
            }
        }
예제 #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;
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeSession();
     }
 }
예제 #5
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();
                    }
                }
            }
        }
예제 #6
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;
     }
 }
예제 #7
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;
     }
 }
예제 #8
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;
     }
 }
 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;
     }
 }
예제 #10
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;
     }
 }
예제 #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //HtmlMeta meta = new HtmlMeta();
        //meta.HttpEquiv = "X-UA-Compatible";
        //meta.Content = "IE=edge";
        //HtmlHead head = Page.Header;
        //head.Controls.Add(meta);


        //GetCurrentDefaultStudyID();
        if (print_jminfo)
        {
            jminfo.Text += "**Load**..IsPostBack=" + IsPostBack.ToString() + "<br/>";
        }

        if (!IsPostBack)
        {
            if (Request.QueryString["coderpair"] != null & Request.QueryString["measureID"] != null)
            {
                int measureID = Convert.ToInt32(Request.QueryString["measureID"].ToString());
                Load_coderpair_list(measureID);

                string coderpair = Request.QueryString["coderpair"];
                LoadCoderPairDetails(coderpair);
            }
            else if (Request.QueryString["measureID"] != null)
            {
                int measureID = Convert.ToInt32(Request.QueryString["measureID"].ToString());
                Load_coderpair_list(measureID);

                UpdatePanel_coderpair_single.Visible = false;
            }
        }
    }
예제 #12
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;
     }
 }
예제 #13
0
        private void Page_Init(object sender, System.EventArgs e)
        {
            Log.Log.WriteToLog(PageName + "Page_Init (IsPostBack=\"" + IsPostBack.ToString().ToLower() + "\")", true);

            /*
             * if(IsPostBack)
             * {
             *      string
             *              tmpString=string.Empty;
             *
             *      TextBox
             *              tmpTextBox;
             *
             *      foreach(DataGridItem item in DataGridWEvents.Items)
             *      {
             *              if((tmpTextBox=(item.FindControl(TextBoxSignature) as TextBox))==null)
             *                      continue;
             *
             *              if(tmpString!=string.Empty)
             *                      tmpString+=Environment.NewLine;
             *
             *              tmpString+=tmpTextBox.Text;
             *      }
             * }
             */
        }
예제 #14
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;
     }
 }
예제 #15
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();
                }
            }
        }
예제 #16
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;
            }
        }
예제 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         Session["View_EmpList"] = new CustomList <HRM_Emp>();
     }
 }
예제 #18
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;
                 }
             }
         }
     }
 }
예제 #19
0
 protected override void OnPreLoad(EventArgs e)
 {
     if (IsPostBack.IsFalse() && RequiresAuthorization)
     {
         GetFormAccess();
     }
     base.OnPreLoad(e);
 }
예제 #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         LatestNewsList = new CustomList <LatestNews>();
         LatestNewsList = _manager.GetAllLatestNews();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         AttValidDataList = new CustomList <ATT_IO>();
         AttRejectedList  = new CustomList <ATT_IO>();
     }
 }
예제 #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeCombo();
         InitializeSession();
         ddlRecipient_nc_SelectedIndexChanged(null, null);
     }
 }
예제 #23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializeCombo();
         StockViewList = new CustomList <DAO.StockView>();
         StockViewList = manager.StockView1();
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            LogII.LogII.MakeFile(LogFileName, "Page_Load (IsPostBack=\"" + IsPostBack.ToString().ToLower() + "\")", true);

            if (!IsPostBack)
            {
                SqlDataSource4.SelectParameters["BirthDate"].DefaultValue = DateTime.Now.ToShortDateString();
            }
        }
        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;
            }
        }
예제 #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         InitializieCombo();
         //ClearControls();
         InitializeSession();
         //EnableAllControls(false);
     }
 }
예제 #27
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();
     }
 }
예제 #28
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);
     }
 }
예제 #29
0
        private void Page_Init(object sender, System.EventArgs e)
        {
            Log.Log.WriteToLog("FrameForm2.Page_Init() (IsPostBack=\"" + IsPostBack.ToString() + "\")", true);

            if ((TestDSVariable = (TestDS)Session["TestDS"]) == null)
            {
                TestDSVariable = new TestDS();
                Session.Add("TestDS", TestDSVariable);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack.IsFalse())
     {
         PopulateControl();
         btnCancel.Visible  = false;
         btnDelete.Visible  = false;
         btnRefresh.Visible = false;
     }
 }