Exemplo n.º 1
0
    protected void lnk_Add_Command(object sender, CommandEventArgs e)
    {
        try
        {
            clearControls();
            SMHR_GLOBALCONFIG _obj_smhr_globalconfig = new SMHR_GLOBALCONFIG();
            _obj_smhr_globalconfig.OPERATION       = operation.Select;
            _obj_smhr_globalconfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable dt = BLL.get_ConfigDetails(_obj_smhr_globalconfig);

            if (dt.Rows.Count > 0)
            {
                if (Convert.ToString(dt.Rows[0]["GLOBALCONFIG_INCIDENT_PREFIX"]) == string.Empty || Convert.ToString(dt.Rows[0]["GLOBALCONFIG_INCIDENT_ID"]) == string.Empty)
                {
                    BLL.ShowMessage(this, "Please Select Incident & Disciplinary Prefixs in Global Configuration");
                    return;
                }
                else
                {
                    rtxt_IncidentID.Text = dt.Rows[0]["GLOBALCONFIG_INCIDENT_PREFIX"].ToString() + (Convert.ToInt32(dt.Rows[0]["GLOBALCONFIG_INCIDENT_ID"].ToString()) + 1).ToString();
                }
            }

            LoadCommittee();
            btn_Save.Visible         = true;
            btn_Update.Visible       = false;
            Rm_CY_page.SelectedIndex = 1;
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "RecordIncident", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    private string getCode()
    {
        string Appcode = string.Empty;

        try
        {
            string code   = string.Empty;
            string str    = string.Empty;
            string Series = string.Empty;


            _obj_smhr_globalconfig                 = new SMHR_GLOBALCONFIG();
            _obj_smhr_globalconfig.OPERATION       = operation.Select;
            _obj_smhr_globalconfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable dt_Details = BLL.get_ConfigDetails(_obj_smhr_globalconfig);
            if (dt_Details.Rows.Count != 0)
            {
                str = Convert.ToString(Convert.ToInt32(dt_Details.Rows[0][2]) + 1).Trim();
                if (str.Length == 1)
                {
                    Series = "000";
                }
                else if (str.Length == 2)
                {
                    Series = "00";
                }
                else if (str.Length == 3)
                {
                    Series = "00";
                }
                else if (str.Length == 4)
                {
                    Series = "0";
                }
                //_obj_smhr_globalconfig = new SMHR_GLOBALCONFIG();
                //_obj_smhr_globalconfig.OPERATION = operation.Select;
                //DataTable dt = BLL.get_ConfigDetails(_obj_smhr_globalconfig);
                Appcode = dt_Details.Rows[0]["GLOBALCONFIG_APP_CODE"].ToString().Trim() + Convert.ToString(Series) + Convert.ToString(str);
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EmployeeRehire", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
        return(Appcode);
    }
    protected void lnk_Add_Command(object sender, CommandEventArgs e)
    {
        try
        {
            Session.Remove("EMPCOMPOFF_WORKDAY");
            //load leave type for which CompOff is allowed.
            if (rcmb_Compoff.Items.Count < 2)
            {
                Rm_CMPOFF_page.SelectedIndex = 0;
                BLL.ShowMessage(this, "Please Select Check Comp Off in Leave Master screen for atleast 1 leave type");
                return;
            }
            ///
            rcmb_CmpOffEmployeeID.Items.Clear();
            rcmb_CmpOffEmployeeID.Items.Insert(0, new RadComboBoxItem("", ""));
            SMHR_GLOBALCONFIG _obj_SMHR_GlobalConfig = new SMHR_GLOBALCONFIG();
            _obj_SMHR_GlobalConfig.OPERATION       = operation.Validate;
            _obj_SMHR_GlobalConfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable dt = BLL.get_ConfigDetails(_obj_SMHR_GlobalConfig);
            Rm_CMPOFF_page.SelectedIndex = 1;
            btn_Save.Visible             = true;
            btn_Update.Visible           = false;
            if (Convert.ToBoolean(dt.Rows[0]["GLOBALCONFIG_LEAVETRANFLAG"]) == true)
            {
                BLL.ShowMessage(this, "Year end process for leaves is in progress, no comp off request is considered");
                btn_Save.Visible = false;
            }

            //if (Convert.ToInt32(Session["EMP_ID"]) > 0)
            //if (Session["SELFSERVICE"] == "true")
            if (Control != null)
            {
                if ((Convert.ToString(Session["SELFSERVICE"]) == "true" && Control.ToUpper() == "SELFCOMP") || (Convert.ToString(Session["SELFSERVICE"]) == "" && Control.ToUpper() == "SELFCOMP"))
                {
                    SMHR_EMPASSETDOC _obj_smhr_empAssetDoc = new SMHR_EMPASSETDOC();
                    _obj_smhr_empAssetDoc.EMPASSETDOC_EMP_ID = Convert.ToInt32(Session["EMP_ID"]);
                    _obj_smhr_empAssetDoc.ORGANISATION_ID    = Convert.ToInt32(Session["ORG_ID"]);
                    DataTable Dt_Details = BLL.get_EmpAssetDocBU(_obj_smhr_empAssetDoc);
                    if (Dt_Details.Rows.Count == 1)
                    {
                        rcmb_BusinessUnit.DataSource     = Dt_Details;
                        rcmb_BusinessUnit.DataValueField = "BUSINESSUNIT_ID";
                        rcmb_BusinessUnit.DataTextField  = "BUSINESSUNIT_CODE";
                        rcmb_BusinessUnit.DataBind();
                        LoadEmployees();
                        rcmb_CmpOffEmployeeID.SelectedIndex = rcmb_CmpOffEmployeeID.FindItemIndexByValue(Convert.ToString(Session["EMP_ID"]));
                        rcmb_CmpOffEmployeeID.Enabled       = false;
                        rcmb_BusinessUnit.Enabled           = false;
                    }
                }
            }
            else
            {
                rcmb_BusinessUnit.Enabled     = true;
                rcmb_CmpOffEmployeeID.Enabled = true;
            }
            if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2)
            {
                Rg_CmpOffDet.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;
                btn_Save.Visible   = false;
                btn_Update.Visible = false;
                // added to support Only-View functionality.
                foreach (GridColumn col in Rg_CmpOffDet.Columns)
                {
                    if (col.UniqueName == "ColEdit")
                    {
                        col.Visible = false;
                    }
                }
            }
            rdp_AppDate.SelectedDate = System.DateTime.Now;
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_comoffrequest", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Exemplo n.º 4
0
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        try
        {
            _obj_smhr_globalConfig                 = new SMHR_GLOBALCONFIG();
            _obj_smhr_globalConfig.OPERATION       = operation.Select;
            _obj_smhr_globalConfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            dtDetails = BLL.get_ConfigDetails(_obj_smhr_globalConfig);
            if (dtDetails.Rows.Count != 0)
            {
                _obj_smhr_globalConfig.GLOBALCONFIG_APP_ID   = Convert.ToInt32(rntxt_AppNo.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_APP_CODE = Convert.ToString(rtxt_AppPrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_NEXT_ID  = 0;
                //_obj_smhr_globalConfig.GLOBALCONFIG_EMP_CODE = Convert.ToString(rtxt_EmpPrefix.Text.Replace("'", "''"));
                //_obj_smhr_globalConfig.GLOBALCONFIG_CONSULTANT_EMP_CODE = Convert.ToString(rtxt_ConsultantPrefix.Text.Replace("'", "''"));
                //_obj_smhr_globalConfig.GLOBALCONFIG_CONTRACT_EMP_CODE = Convert.ToString(rtxt_ContractPrefix.Text.Replace("'", "''"));
                //_obj_smhr_globalConfig.GLOBALCONFIG_EMP_ID = Convert.ToInt32(rntxt_EmpNo.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_NextEMP_ID        = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_LOAN_ID           = Convert.ToInt32(rntxt_LoanID.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_LOAN_NO           = Convert.ToString(rtxt_LoanPrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_INCIDENT_ID       = Convert.ToInt32(rntxt_IncidentID.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_INCIDENT_PREFIX   = Convert.ToString(rtxt_IncidentPrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_DISCIPLINE_ID     = Convert.ToInt32(rntxt_DisciplineID.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_DISCIPLINE_PREFIX = Convert.ToString(rtxt_DisciplinePrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_MAILID            = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_PERIOD_CODE       = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_PWD                 = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_SALSTRUCT_CODE      = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_TRAVEL_REQUEST_CODE = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_TRAVEL_REQUEST_ID   = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_USERNAME            = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_JOB_REQ_CODE        = Convert.ToInt32(rntxt_JobReq_Code.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_DOMAIN_IP           = "";
                _obj_smhr_globalConfig.GLOABLCONFIG_THEME               = Convert.ToString(rcmb_Theme.SelectedItem.Text);
                _obj_smhr_globalConfig.GLOBALCONFIG_RECRUIT_JOBREQ_CODE = Convert.ToString(rtxt_JobReqcode.Text);
                _obj_smhr_globalConfig.GLOBALCONFIG_PEN_REGAMT          = Convert.ToDouble(rtxt_PensionRegdAmt.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_INSTAXRELIEF        = Convert.ToDouble(rtxt_InsuranceTaxRelief.Value);
                if (rtxt_Payrollfootermsg.Text != String.Empty || rtxt_Payrollfootermsg.Text != "")
                {
                    _obj_smhr_globalConfig.PayrollFooterMsg = BLL.ReplaceQuote(rtxt_Payrollfootermsg.Text);
                }
                else
                {
                    _obj_smhr_globalConfig.PayrollFooterMsg = null;
                }
                // _obj_smhr_globalConfig = new SMHR_GLOBALCONFIG();
                _obj_smhr_globalConfig.OPERATION       = operation.ChkSuperModuleID;
                _obj_smhr_globalConfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                dtDetails1 = BLL.get_ConfigDetails(_obj_smhr_globalConfig);
                if (dtDetails1.Rows[0]["SMHR_SUP_MODULE_NAME"].ToString() == "1")
                {
                    if (rtxt_JobReqcode.Text == "")
                    {
                        BLL.ShowMessage(this, "Job Requisition Code is Mandatory");
                        return;
                    }
                }

                _obj_smhr_globalConfig.GLOBALCONFIG_DATEFORMAT = Convert.ToString(rcmb_DateFormat.SelectedItem.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_MINAGE     = Convert.ToInt32(rntxt_MinAge.Text);
                _obj_smhr_globalConfig.GLOBALCONFIG_MAXAGE     = Convert.ToInt32(rntxt_MaxAge.Text);
                //_obj_smhr_globalConfig.GLOBALCONFIG_APPLIEDDATES = chk_AppliedDates.Checked;
                if (chk_AppliedDates.Checked)
                {
                    _obj_smhr_globalConfig.GLOBALCONFIG_APPLIEDDATES = true;
                }
                else
                {
                    _obj_smhr_globalConfig.GLOBALCONFIG_APPLIEDDATES = false;
                }
                _obj_smhr_globalConfig.GLOBALCONFIG_LEAVETRANFLAG = Convert.ToInt32(chk_LeaveTranFlag.Checked);
                //_obj_smhr_globalConfig.GLOBALCONFIG_CONTRACTNO = Convert.ToInt32(rntxt_EmpPart.Value);
                //_obj_smhr_globalConfig.GLOBALCONFIG_TRAINEENO = Convert.ToInt32(rntxt_EmpTrainee.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO_WIDTH  = Convert.ToInt32(rntxt_Width.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO_HEIGHT = Convert.ToInt32(rntxt_Height.Value);

                if (!string.IsNullOrEmpty(FUpload.PostedFile.FileName))
                {
                    FUpload.PostedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/EmpUploads"), rntxt_AppNo.Text + "_" + Convert.ToString(Session["ORG_ID"]) + "_" + FUpload.FileName));
                    _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO = "~/EmpUploads/" + rntxt_AppNo.Text + "_" + Convert.ToString(Session["ORG_ID"]) + "_" + FUpload.FileName;
                    lbl_LogoPath.Text = "~/EmpUploads/" + rntxt_AppNo.Text + "_" + Convert.ToString(Session["ORG_ID"]) + "_" + FUpload.FileName;
                }
                else
                {
                    _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO = lbl_LogoPath.Text;
                }
                _obj_smhr_globalConfig.LASTMDFBY       = Convert.ToInt32(Session["USER_ID"]);
                _obj_smhr_globalConfig.OPERATION       = operation.Update;
                _obj_smhr_globalConfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                bool result = BLL.set_GlobalConfig(_obj_smhr_globalConfig);
                if (result == true)
                {
                    BLL.ShowMessage(this, "Details Successfully Saved");
                    // Response.Redirect("~/Security/frm_GlobalConfig.aspx", false);AS IT IS IN THE SAME PAGE MESSAGE IS NOT DISPLAYING.
                    LoadDetails();
                    return;
                }
                else
                {
                    BLL.ShowMessage(this, "Error Occured While Performing the Operation");
                    return;
                }
            }
            else
            {
                _obj_smhr_globalConfig.GLOBALCONFIG_APP_ID   = Convert.ToInt32(rntxt_AppNo.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_APP_CODE = Convert.ToString(rtxt_AppPrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_NEXT_ID  = 0;
                //_obj_smhr_globalConfig.GLOBALCONFIG_EMP_CODE = Convert.ToString(rtxt_EmpPrefix.Text.Replace("'", "''"));
                //_obj_smhr_globalConfig.GLOBALCONFIG_CONSULTANT_EMP_CODE = Convert.ToString(rtxt_ConsultantPrefix.Text.Replace("'", "''"));
                //_obj_smhr_globalConfig.GLOBALCONFIG_CONTRACT_EMP_CODE = Convert.ToString(rtxt_ContractPrefix.Text.Replace("'", "''"));
                //_obj_smhr_globalConfig.GLOBALCONFIG_EMP_ID = Convert.ToInt32(rntxt_EmpNo.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_NextEMP_ID        = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_LOAN_ID           = Convert.ToInt32(rntxt_LoanID.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_LOAN_NO           = Convert.ToString(rtxt_LoanPrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_INCIDENT_ID       = Convert.ToInt32(rntxt_IncidentID.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_INCIDENT_PREFIX   = Convert.ToString(rtxt_IncidentPrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_DISCIPLINE_ID     = Convert.ToInt32(rntxt_DisciplineID.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_DISCIPLINE_PREFIX = Convert.ToString(rtxt_DisciplinePrefix.Text.Replace("'", "''"));
                _obj_smhr_globalConfig.GLOBALCONFIG_MAILID            = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_PERIOD_CODE       = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_PWD                 = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_SALSTRUCT_CODE      = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_TRAVEL_REQUEST_CODE = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_TRAVEL_REQUEST_ID   = 0;
                _obj_smhr_globalConfig.GLOBALCONFIG_USERNAME            = "";
                _obj_smhr_globalConfig.GLOBALCONFIG_JOB_REQ_CODE        = Convert.ToInt32(rntxt_JobReq_Code.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_DOMAIN_IP           = "";
                _obj_smhr_globalConfig.GLOABLCONFIG_THEME               = Convert.ToString(rcmb_Theme.SelectedItem.Text);


                _obj_smhr_globalConfig.GLOBALCONFIG_DATEFORMAT = Convert.ToString(rcmb_DateFormat.SelectedItem.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_MINAGE     = Convert.ToInt32(rntxt_MinAge.Text);
                _obj_smhr_globalConfig.GLOBALCONFIG_MAXAGE     = Convert.ToInt32(rntxt_MaxAge.Text);
                //_obj_smhr_globalConfig.PayrollFooterMsg = Convert.ToString(rtxt_Payrollfootermsg.Text);
                if (rtxt_Payrollfootermsg.Text != string.Empty || rtxt_Payrollfootermsg.Text != "")
                {
                    _obj_smhr_globalConfig.PayrollFooterMsg = BLL.ReplaceQuote(rtxt_Payrollfootermsg.Text);
                }
                else
                {
                    _obj_smhr_globalConfig.PayrollFooterMsg = null;
                }
                //_obj_smhr_globalConfig.GLOBALCONFIG_APPLIEDDATES = chk_AppliedDates.Checked;
                if (chk_AppliedDates.Checked)
                {
                    _obj_smhr_globalConfig.GLOBALCONFIG_APPLIEDDATES = true;
                }
                else
                {
                    _obj_smhr_globalConfig.GLOBALCONFIG_APPLIEDDATES = false;
                }
                _obj_smhr_globalConfig.GLOBALCONFIG_LEAVETRANFLAG = Convert.ToInt32(chk_LeaveTranFlag.Checked);
                //_obj_smhr_globalConfig.GLOBALCONFIG_CONTRACTNO = Convert.ToInt32(rntxt_EmpPart.Value);
                //_obj_smhr_globalConfig.GLOBALCONFIG_TRAINEENO = Convert.ToInt32(rntxt_EmpTrainee.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO_WIDTH  = Convert.ToInt32(rntxt_Width.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO_HEIGHT = Convert.ToInt32(rntxt_Height.Value);
                if (!string.IsNullOrEmpty(FUpload.PostedFile.FileName))
                {
                    FUpload.PostedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/EmpUploads"), rntxt_AppNo.Text + "_" + Convert.ToString(Session["ORG_ID"]) + "_" + FUpload.FileName));
                    _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO = "~/EmpUploads/" + rntxt_AppNo.Text + "_" + Convert.ToString(Session["ORG_ID"]) + "_" + FUpload.FileName;
                    lbl_LogoPath.Text = "~/EmpUploads/" + rntxt_AppNo.Text + "_" + Convert.ToString(Session["ORG_ID"]) + "_" + FUpload.FileName;
                }
                else
                {
                    _obj_smhr_globalConfig.GLOBALCONFIG_COMPANYLOGO = lbl_LogoPath.Text;
                }

                _obj_smhr_globalConfig.LASTMDFBY                 = Convert.ToInt32(Session["USER_ID"]);
                _obj_smhr_globalConfig.OPERATION                 = operation.Insert;
                _obj_smhr_globalConfig.ORGANISATION_ID           = Convert.ToInt32(Session["ORG_ID"]);
                _obj_smhr_globalConfig.GLOBALCONFIG_PEN_REGAMT   = Convert.ToDouble(rtxt_PensionRegdAmt.Value);
                _obj_smhr_globalConfig.GLOBALCONFIG_INSTAXRELIEF = Convert.ToDouble(rtxt_InsuranceTaxRelief.Value);
                bool result = BLL.set_GlobalConfig(_obj_smhr_globalConfig);
                if (result == true)
                {
                    BLL.ShowMessage(this, "Details Successfully Saved");
                    // Response.Redirect("~/Security/frm_GlobalConfig.aspx", false);AS IT IS IN SAME FORM MESSAGE IS NOT DISPLAYING
                    LoadDetails();
                    return;
                }
                else
                {
                    BLL.ShowMessage(this, "Error Occured While Performing the Operation");
                    return;
                }
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_GlobalConfig", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Exemplo n.º 5
0
    private void LoadDetails()
    {
        try
        {
            _obj_smhr_globalConfig                 = new SMHR_GLOBALCONFIG();
            _obj_smhr_globalConfig.OPERATION       = operation.Select;
            _obj_smhr_globalConfig.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            dtDetails = BLL.get_ConfigDetails(_obj_smhr_globalConfig);
            if (dtDetails.Rows.Count != 0)
            {
                rntxt_AppNo.Value = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_APP_ID"]));
                //rntxt_EmpNo.Value = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_EMP_ID"]));
                rntxt_LoanID.Value   = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_LOAN_ID"]));
                rtxt_LoanPrefix.Text = Convert.ToString(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_LOAN_NO"]));
                if (dtDetails.Rows[0]["GLOBALCONFIG_INCIDENT_ID"].ToString() != string.Empty)
                {
                    rntxt_IncidentID.Value = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_INCIDENT_ID"]));
                }
                rtxt_IncidentPrefix.Text = Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_INCIDENT_PREFIX"]);

                if (dtDetails.Rows[0]["GLOBALCONFIG_DISCIPLINE_ID"].ToString() != string.Empty)
                {
                    rntxt_DisciplineID.Value = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_DISCIPLINE_ID"]));
                }
                rtxt_DisciplinePrefix.Text = Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_DISCIPLINE_PREFIX"]);

                // rtxt_EmpPrefix.Text = Convert.ToString(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_EMP_CODE"]));
                rtxt_AppPrefix.Text = Convert.ToString(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_APP_CODE"]));
                //if (dtDetails.Rows[0]["GLOBALCONFIG_CONTRACT_EMPCODE"] != System.DBNull.Value)
                //{
                //    rtxt_ContractPrefix.Text = Convert.ToString(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_CONTRACT_EMPCODE"]));
                //}
                //else
                //{
                //    rtxt_ContractPrefix.Text = string.Empty;
                //}
                //if (dtDetails.Rows[0]["GLOBALCONFIG_CONSULTANT_EMPCODE"] != System.DBNull.Value)
                //{
                //    rtxt_ConsultantPrefix.Text = Convert.ToString(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_CONSULTANT_EMPCODE"]));
                //}
                //else
                //{
                //    rtxt_ConsultantPrefix.Text = string.Empty;
                //}
                //rntxt_EmpPart.Value = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_CONTRACTNO"]));
                //rntxt_EmpTrainee.Value = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_TRAINEENO"]));
                rntxt_Width.Value             = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_COMPANYLOGO_WIDTH"]));
                rntxt_Height.Value            = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_COMPANYLOGO_HEIGHT"]));
                rntxt_JobReq_Code.Value       = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_JOB_REQ_CODE"]));
                rcmb_DateFormat.SelectedIndex = rcmb_DateFormat.FindItemIndexByValue(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_DATEFORMAT"]));
                rntxt_MinAge.Value            = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_MINAGE"]));
                rntxt_MaxAge.Value            = Convert.ToInt32(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_MAXAGE"]));
                chk_AppliedDates.Checked      = Convert.ToBoolean(dtDetails.Rows[0]["GLOBALCONFIG_APPLIEDDATES"]);
                lbl_LogoPath.Text             = Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_COMPANYLOGO"]);
                chk_LeaveTranFlag.Checked     = Convert.ToBoolean(dtDetails.Rows[0]["GLOBALCONFIG_LEAVETRANFLAG"]);

                rtxt_JobReqcode.Text = Convert.ToString(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_RECRUIT_JOBREQ_CODE"]));

                if (dtDetails.Rows[0]["GLOBALCONFIG_THEME"] != System.DBNull.Value)
                {
                    rcmb_Theme.SelectedIndex = rcmb_Theme.FindItemIndexByValue(Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_THEME"]));
                }
                if (Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_PEN_REGAMT"]) != "")
                {
                    rtxt_PensionRegdAmt.Value = Convert.ToDouble(dtDetails.Rows[0]["GLOBALCONFIG_PEN_REGAMT"]);
                }
                else
                {
                    rtxt_PensionRegdAmt.Text = string.Empty;
                }

                if (Convert.ToString(dtDetails.Rows[0]["GLOBALCONFIG_INSTAXRELIEF"]) != "")
                {
                    rtxt_InsuranceTaxRelief.Value = Convert.ToDouble(dtDetails.Rows[0]["GLOBALCONFIG_INSTAXRELIEF"]);
                }
                else
                {
                    rtxt_InsuranceTaxRelief.Text = string.Empty;
                }

                if (dtDetails.Rows[0]["PAYROLLFOOTERMSG"] != "" || dtDetails.Rows[0]["PAYROLLFOOTERMSG"] != System.DBNull.Value)
                {
                    rtxt_Payrollfootermsg.Text = Convert.ToString(dtDetails.Rows[0]["PAYROLLFOOTERMSG"]);
                }
                else
                {
                    rtxt_Payrollfootermsg.Text = string.Empty;
                }
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_GlobalConfig", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }