コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Common.FillDropDownList_All(objMasMgr.SelectDivision(0), ddlIntervention);
         Common.FillDropDownList_All(objMasMgr.SelectOfficeTypeList(0), ddlOffType);
         Common.FillDropDownList_Nil(objMasMgr.GetOfficeList(0, -1, -1), ddlOffice);
         Common.FillDropDownList(objEmpMgr.SelectEmpNameWithID("A"), ddlEmployee, "EMPNAME", "EMPID", true);
         if (Session["ISADMIN"].ToString() == "N")
         {
             ddlEmployee.SelectedValue = Session["EMPID"].ToString().ToUpper();
             ddlEmployee.Enabled       = false;
             ddlOffice.Enabled         = false;
         }
         else if (Session["ISADMIN"].ToString() == "Y")
         {
             if (Session["USERID"].ToString().ToUpper() != "ADMIN")
             {
                 ddlEmployee.Enabled = true;
                 ddlOffice.Enabled   = true;
             }
         }
         else
         {
             ddlEmployee.SelectedIndex = -1;
             ddlEmployee.Enabled       = true;
             ddlOffice.Enabled         = false;
         }
     }
 }
コード例 #2
0
    private void OpenRecord(decimal officeid, decimal unit, decimal offtype)
    {
        //Common.EmptyTextBoxValues(this);
        DataTable dtList = objTMM.GetOfficeList(officeid, unit, offtype);

        grOfficeList.DataSource = dtList;
        grOfficeList.DataBind();
    }
コード例 #3
0
 protected void ddlOffType_SelectedIndexChanged(object sender, EventArgs e)
 {
     TabContainer1.ActiveTabIndex = 1;
     Common.FillDropDownListWithAll(objMasMgr.GetOfficeList(0, Convert.ToDecimal(ddlIntervention.SelectedValue.Trim()), Convert.ToDecimal(ddlOffType.SelectedValue.Trim())), ddlOffice, "OfficeTitleCombine", "OfficeID");
 }
コード例 #4
0
 protected void ddlOffType_SelectedIndexChanged(object sender, EventArgs e)
 {
     Common.FillDropDownList(objMastMg.GetOfficeList(0, Convert.ToDecimal(ddlIntervention.SelectedValue.Trim()), Decimal.Parse(ddlOffTypeSearch.SelectedValue.Trim())), ddlOffice, "officetitle", "officeid", true);
 }
コード例 #5
0
    private void FillEmpInfo(string strEmpId)
    {
        if (txtEmpID.Text.Trim() != "")
        {
            dtEmpInfo = objEmpInfoMgr.SelectEmpInfoHR(txtEmpID.Text.Trim());
            if (dtEmpInfo.Rows.Count == 0)
            {
                lblMsg.Text = "Invalid Employee Id .";
            }
            else
            {
                //if (GetTaskPermission() == false)
                //{
                //    this.RefreshControl();
                //    lblMsg.Text = "Please mention contractual & intern staff's id.";
                //    btnSave.Enabled = false;
                //    return;
                //}



                lblMsg.Text      = "";
                chkIsNew.Checked = false;
                foreach (DataRow dRow in dtEmpInfo.Rows)
                {
                    bool isPermitted = objViewPerm.GetExistPermission(dRow, 302);
                    if (!isPermitted)
                    {
                        lblMsg.Text = "You have no permission to View this Employee";
                        return;
                    }
                    txtEmpFullName.Text      = dRow["FullName"].ToString().Trim();
                    txtEmpFullName.ToolTip   = Common.DisplayDate(dRow["DOB"].ToString().Trim());
                    ddlCompany.SelectedValue = Common.RetrieveddL(ddlCompany, dRow["DivisionId"].ToString(), "99999");
                    Common.FillDropDownList_Nil(objMasMgr.GetOfficeList(0, Convert.ToDecimal(ddlCompany.SelectedValue.Trim()), -1), ddlOffice);

                    //DataTable allowedDivisions = objViewPerm.ExistSelection(objMasMgr.GetOfficeList(0, Convert.ToDecimal(ddlCompany.SelectedValue.Trim()), Convert.ToDecimal(ddlOffType.SelectedValue.Trim())), ViewPermission.SelectionList.HeadOfficeId, 302);
                    //Common.FillDropDownList(allowedDivisions, ddlOffice, "OfficeTitleCombine", "OfficeID", true);

                    ddlOffice.SelectedValue        = Common.RetrieveddL(ddlOffice, dRow["OfficeId"].ToString(), "99999");
                    ddlProject.SelectedValue       = Common.RetrieveddL(ddlProject, dRow["ProjectId"].ToString(), "99999");
                    ddlSector.SelectedValue        = Common.RetrieveddL(ddlSector, dRow["SectorId"].ToString(), "99999");
                    ddlDept.SelectedValue          = Common.RetrieveddL(ddlDept, dRow["DeptId"].ToString(), "99999");
                    ddlUnit.SelectedValue          = Common.RetrieveddL(ddlUnit, dRow["UnitId"].ToString(), "99999");
                    ddlComponent.SelectedValue     = Common.RetrieveddL(ddlComponent, dRow["ComponentId"].ToString(), "99999");
                    ddlPosByFunction.SelectedValue = Common.RetrieveddL(ddlPosByFunction, dRow["PosFuncId"].ToString(), "99999");
                    ddlGrade.SelectedValue         = Common.RetrieveddL(ddlGrade, dRow["GradeId"].ToString(), "99999");
                    ddlGradeLevel.SelectedValue    = Common.RetrieveddL(ddlGradeLevel, dRow["GradeLevelId"].ToString(), "99999");

                    ddlDesignation.SelectedValue = Common.RetrieveddL(ddlDesignation, dRow["DesigId"].ToString(), "99999");
                    //Common.FillDropDownList_Nil(objMasMgr.SelectDesigWiseJobTitle2(Convert.ToInt32(ddlDesignation.SelectedValue)), ddlJobTitle);
                    ddlJobTitle.SelectedValue = Common.RetrieveddL(ddlJobTitle, dRow["JobTitleId"].ToString(), "99999");

                    ddlEmpType.SelectedValue   = Common.RetrieveddL(ddlEmpType, dRow["EmpTypeID"].ToString(), "99999");
                    ddlEmpNature.SelectedValue = Common.RetrieveddL(ddlEmpNature, dRow["EmpNatureID"].ToString(), "99999");

                    ddlPostDivision.SelectedValue = Common.RetrieveddL(ddlPostDivision, dRow["PostingDivId"].ToString(), "99999");
                    Common.FillDropDownList_Nil(objMasMgr.SelectDivisionWiseDistrict2(Convert.ToInt32(ddlPostDivision.SelectedValue)), ddlPostDistrict);
                    ddlPostDistrict.SelectedValue = Common.RetrieveddL(ddlPostDistrict, dRow["PostingDistId"].ToString(), "99999");

                    ddlPostingPlace.SelectedValue = Common.RetrieveddL(ddlPostingPlace, dRow["PostingPlaceId"].ToString(), "99999");
                    ddlSalaryLoc.SelectedValue    = Common.RetrieveddL(ddlSalaryLoc, dRow["SalLocId"].ToString(), "99999");

                    //ddlSalarySubLoc.SelectedValue = Common.RetrieveddL(ddlSalarySubLoc, dRow["SalSubLocId"].ToString(), "99999");

                    txtBankAccNo.Text   = dRow["BankAccNo"].ToString().Trim();
                    txtBasicSalary.Text = dRow["BasicSalary"].ToString().Trim();
                    txtConfirmDate.Text = string.IsNullOrEmpty(dRow["ConfirmationDate"].ToString()) == false?Common.DisplayDate(dRow["ConfirmationDate"].ToString()) : "";

                    txtContractExpDate.Text = string.IsNullOrEmpty(dRow["ContractEndDate"].ToString()) == false?Common.DisplayDate(dRow["ContractEndDate"].ToString()) : "";

                    txtContractInterval.Text = dRow["ContractInterval"].ToString().Trim();
                    txtContractPurpose.Text  = dRow["ContractPurpose"].ToString().Trim();
                    txtDateInGrade.Text      = string.IsNullOrEmpty(dRow["DateInGrade"].ToString()) == false?Common.DisplayDate(dRow["DateInGrade"].ToString()) : "";

                    txtDateInPosition.Text = string.IsNullOrEmpty(dRow["DateInPosition"].ToString()) == false?Common.DisplayDate(dRow["DateInPosition"].ToString()) : "";

                    txtJoiningDate.Text = string.IsNullOrEmpty(dRow["JoiningDate"].ToString()) == false?Common.DisplayDate(dRow["JoiningDate"].ToString()) : "";

                    txtOtherBenefit.Text = dRow["OtherBenefit"].ToString().Trim();
                    txtPostingDate.Text  = string.IsNullOrEmpty(dRow["PostingDate"].ToString()) == false?Common.DisplayDate(dRow["PostingDate"].ToString()) : "";

                    txtProbationPeriod.Text = dRow["ProbationPeriod"].ToString().Trim();
                    txtRemarks.Text         = dRow["Remarks"].ToString().Trim();
                    txtRetirementDate.Text  = string.IsNullOrEmpty(dRow["RetirementDate"].ToString()) == false?Common.DisplayDate(dRow["RetirementDate"].ToString()) : "";

                    if (string.IsNullOrEmpty(txtRetirementDate.Text) == true)
                    {
                        char[]   splitter          = { '/' };
                        string[] arinfo            = Common.str_split(txtEmpFullName.ToolTip.ToString(), splitter);
                        int      iBirthYear        = 0;
                        string   strRetirementDate = "";
                        if (arinfo.Length == 3)
                        {
                            iBirthYear = Convert.ToInt16(arinfo[2]);
                            iBirthYear = iBirthYear + 60;

                            strRetirementDate = iBirthYear + "/" + arinfo[1] + "/" + arinfo[0];
                            arinfo            = null;
                        }
                        txtRetirementDate.Text = Common.DisplayDate(strRetirementDate);
                    }
                    txtSeparationDate.Text = string.IsNullOrEmpty(dRow["SeparateDate"].ToString()) == false?Common.DisplayDate(dRow["SeparateDate"].ToString()) : "";

                    txtSeparationReason.Text = dRow["SeparateReason"].ToString().Trim();
                    //txtTrainSerEndDt.Text = string.IsNullOrEmpty(dRow["ServiceEndDate"].ToString()) == false ? Common.DisplayDate(dRow["ServiceEndDate"].ToString()) : "";
                    //txtTranSerStartDt.Text = string.IsNullOrEmpty(dRow["ServiceStartDate"].ToString()) == false ? Common.DisplayDate(dRow["ServiceStartDate"].ToString()) : "";
                    txtSeveranceId.Text     = dRow["SeveranceId"].ToString().Trim();
                    txtSeveranceReason.Text = dRow["SeveranceReason"].ToString().Trim();
                    txtWorkArea.Text        = dRow["WorkArea"].ToString().Trim();
                    txtActionDate.Text      = string.IsNullOrEmpty(dRow["ActionDate"].ToString()) == false?Common.DisplayDate(dRow["ActionDate"].ToString()) : "";

                    txtActionName.Text    = dRow["ActionName"].ToString().Trim();
                    txtWorkingDays.Text   = dRow["WorkingDays"].ToString().Trim();
                    txtSecurityMoney.Text = dRow["SecurityMoney"].ToString().Trim();

                    lnkEmpCV.Text        = dRow["UploadCV"].ToString().Trim();
                    lnkEmpSignature.Text = dRow["EmpSignature"].ToString().Trim();
                    lnkEmpDocument.Text  = dRow["UploadDocument"].ToString().Trim();

                    //ddlBonusPak.SelectedValue = Common.RetrieveddL(ddlBonusPak, dRow["BonusPakId"].ToString(), "-1");
                    ddlBankName.SelectedValue = Common.RetrieveddL(ddlBankName, dRow["BankCode"].ToString(), "-1");
                    Common.FillDropDownList(objEmpInfoMgr.SelectBranchList(ddlBankName.SelectedValue.ToString()), ddlBranchCode, "BranchName", "Routingno", true, "Nil");
                    ddlBranchCode.SelectedValue = Common.RetrieveddL(ddlBranchCode, dRow["RoutingNo"].ToString(), "-1");
                    lblRoutingNo.Text           = dRow["RoutingNo"].ToString().Trim();

                    ddlLeavePackage.SelectedValue = Common.RetrieveddL(ddlLeavePackage, dRow["LeavePakId"].ToString(), "99999");
                    hfLPakId.Value = ddlLeavePackage.SelectedValue.ToString();
                    //hfJoiningDate.Value = Common.DisplayDate(txtJoiningDate.Text);
                    ddlMPC.SelectedValue       = Common.RetrieveddL(ddlMPC, dRow["MPCId"].ToString(), "99999");
                    ddlSalaryPak.SelectedValue = Common.RetrieveddL(ddlSalaryPak, dRow["SalPakId"].ToString(), "99999");

                    ddlSepType.SelectedValue = Common.RetrieveddL(ddlSepType, dRow["SeparateTypeId"].ToString(), "99999");
                    ddlStatus.SelectedValue  = Common.RetrieveddL(ddlStatus, dRow["EmpStatus"].ToString(), "99999");
                    chkIsNotRehire.Checked   = dRow["IsNotRehirable"].ToString() == "Y" ? true : false;
                    txtNotRehireReason.Text  = dRow["NotRehireReason"].ToString().Trim();
                    txtSupervisor.Text       = dRow["SupervisorId"].ToString().Trim();
                    //ddlSupervisor.SelectedValue = Common.RetrieveddL(ddlSupervisor, dRow["SupervisorId"].ToString(), "-1");
                    txtLeaveSupervisor.Text      = dRow["LeaveSupervisorId"].ToString().Trim();
                    ddlUnit.SelectedValue        = Common.RetrieveddL(ddlUnit, dRow["UnitId"].ToString(), "99999");
                    ddlComponent.SelectedValue   = Common.RetrieveddL(ddlComponent, dRow["ComponentId"].ToString(), "99999");
                    ddlWeekend.SelectedValue     = Common.RetrieveddL(ddlWeekend, dRow["WeekendId"].ToString(), "99999");
                    ddlAttndPolicy.SelectedValue = Common.RetrieveddL(ddlWeekend, dRow["AttnPolicyID"].ToString(), "99999");

                    //chkIsChildEdu.Checked = dRow["IsChildEduAllow"].ToString() == "Y" ? true : false;
                    //chkIsMedicalEntitle.Checked = dRow["IsMedicalEntmnt"].ToString() == "Y" ? true : false;
                    chkIsOTEntitle.Checked        = dRow["IsOTEntmnt"].ToString() == "Y" ? true : false;
                    chkIsPayrollStaff.Checked     = dRow["IsPayrollStaff"].ToString() == "Y" ? true : false;
                    chkIsServiceAgrmnt.Checked    = dRow["IsServiceAgrmnt"].ToString() == "Y" ? true : false;
                    chkIsSeveranceBenefit.Checked = dRow["IsSeveranceBenefit"].ToString() == "Y" ? true : false;
                    chkWorkArea.Checked           = dRow["WorkAreaType"].ToString() == "Y" ? true : false;

                    dtEmpAction = objEmpInfoMgr.SelectEmpActionLog(txtEmpID.Text.Trim());
                    if (dtEmpAction.Rows.Count > 0)
                    {
                        grEmpAction.DataSource = dtEmpAction;
                        grEmpAction.DataBind();

                        foreach (GridViewRow gRow in grEmpAction.Rows)
                        {
                            gRow.Cells[1].Text = Common.DisplayDate(gRow.Cells[1].Text);
                        }
                    }

                    ddlAppointType.SelectedValue = Common.RetrieveddL(ddlAppointType, dRow["AppointType"].ToString(), "99999");
                    txtGross.Text = dRow["GrossSalary"].ToString();

                    ddlOffType.SelectedValue = Common.RetrieveddL(ddlOffType, dRow["OfficeTypeId"].ToString(), "99999");
                    //dtTrainService = objEmpInfoMgr.SelectTrainService(txtEmpID.Text.Trim(), Session["FISCALYRID"].ToString());
                    //if (dtTrainService.Rows.Count > 0)
                    //{
                    //    chkIsServiceAgrmnt.Checked = dtTrainService.Rows[0]["ServAgreement"].ToString() == "Y" ? true : false;
                    //    txtTrainSerStartDt.Text = string.IsNullOrEmpty(dtTrainService.Rows[0]["AgrStartDate"].ToString()) == false ? Common.DisplayDate(dtTrainService.Rows[0]["AgrStartDate"].ToString()) : "";
                    //    txtTrainSerEndDt.Text = string.IsNullOrEmpty(dtTrainService.Rows[0]["AgrEndDate"].ToString()) == false ? Common.DisplayDate(dtTrainService.Rows[0]["AgrEndDate"].ToString()) : "";
                    //}
                    if (Common.CheckNullString(dRow["EmpStatus"].ToString()) == "I")
                    {
                        lblMsg.Text = "This Staff Has Been Separated.";
                        txtSeparationReason.ForeColor = System.Drawing.Color.Red;
                    }
                    else
                    {
                        lblMsg.Text = "";
                    }

                    if ((Common.CheckNullString(dRow["EmpStatus"].ToString()) == "I") && (chkIsNotRehire.Checked == true))
                    {
                        lblMsg.ForeColor             = System.Drawing.Color.Red;
                        txtNotRehireReason.ForeColor = System.Drawing.Color.Red;
                    }
                }
            }
        }
    }
コード例 #6
0
ファイル: Transition.aspx.cs プロジェクト: alamgir019/rdrs_hr
    private void FillEmpInfo(string EmpId)
    {
        dtEmpInfo = objEmpInfoMgr.SelectEmpInfoHRAction(txtEmpID.Text.Trim());

        if (dtEmpInfo.Rows.Count > 0)
        {
            foreach (DataRow row in dtEmpInfo.Rows)
            {
                lblName.Text        = row["FullName"].ToString().Trim();
                lblName.ToolTip     = Common.DisplayDate(row["DOB"].ToString().Trim());
                lblDesignation.Text = row["DesigName"].ToString().Trim();
                lblSector.Text      = row["SectorName"].ToString().Trim();
                lblDept.Text        = row["DeptName"].ToString().Trim();
                lblJoinDate.Text    = Common.DisplayDate(row["JoiningDate"].ToString().Trim());
                lblJoinDate.ToolTip = row["SalPakId"].ToString().Trim();

                ddlCompany.SelectedValue = Common.RetrieveddL(ddlCompany, row["DivisionId"].ToString(), "99999");
                ddlOffType.SelectedValue = Common.RetrieveddL(ddlOffType, row["OfficeTypeId"].ToString(), "99999");
                //Common.FillDropDownList_Nil(objMasMgr.GetOfficeList(Convert.ToDecimal(ddlDesignation.SelectedValue)), ddlJobTitle);
                Common.FillDropDownList_Nil(objMasMgr.GetOfficeList(0, Convert.ToDecimal(ddlCompany.SelectedValue.Trim()), -1), ddlOffice);
                ddlOffice.SelectedValue = Common.RetrieveddL(ddlOffice, row["OfficeId"].ToString(), "99999");

                //ddlCompany.SelectedValue = Common.RetrieveddL(ddlCompany, row["DivisionId"].ToString(), "99999");
                //Common.FillDropDownList_Nil(objMasMgr.GetOfficeList(0, Convert.ToDecimal(ddlCompany.SelectedValue.Trim()), -1), ddlOffice);
                //ddlOffice.SelectedValue = Common.RetrieveddL(ddlOffice, row["OfficeId"].ToString(), "99999");
                ddlProject.SelectedValue     = Common.RetrieveddL(ddlProject, row["ProjectId"].ToString(), "99999");
                ddlJobTitle.SelectedValue    = Common.RetrieveddL(ddlJobTitle, row["JobTitleId"].ToString(), "99999");
                ddlDesignation.SelectedValue = Common.RetrieveddL(ddlDesignation, row["DesigId"].ToString(), "99999");
                ddlSector.SelectedValue      = Common.RetrieveddL(ddlSector, row["SectorId"].ToString(), "99999");

                ddlDepartment.SelectedValue = Common.RetrieveddL(ddlDepartment, row["DeptId"].ToString(), "99999");
                ddlUnit.SelectedValue       = Common.RetrieveddL(ddlUnit, row["UnitId"].ToString(), "99999");
                ddlGrade.SelectedValue      = Common.RetrieveddL(ddlGrade, row["GradeId"].ToString(), "99999");
                ddlGradeLevel.SelectedValue = Common.RetrieveddL(ddlGradeLevel, row["GradeLevelId"].ToString(), "99999");
                string postingDiv = row["PostingDivId"] == null ?null: row["PostingDivId"].ToString();
                ddlDivision.SelectedValue = Common.RetrieveddL(ddlDivision, postingDiv, "-1");
                Common.FillDropDownList_Nil(objMasMgr.SelectDivisionWiseDistrict2(Convert.ToInt32(ddlDivision.SelectedValue)), ddlDistrict);
                string postingDist = row["PostingDistId"] == null ?null: row["PostingDistId"].ToString();
                ddlDistrict.SelectedValue = Common.RetrieveddL(ddlDistrict, postingDist, "99999");
                string salLocId = row["SalLocId"] == null ?null: row["SalLocId"].ToString();
                ddlSalaryLoc.SelectedValue = Common.RetrieveddL(ddlSalaryLoc, salLocId, "99999");

                string postingPlaceId = row["PostingPlaceId"] == null ?null: row["PostingPlaceId"].ToString();
                ddlPostingPlace.SelectedValue = Common.RetrieveddL(ddlPostingPlace, postingPlaceId, "99999");
                string posFuncId = row["PosFuncId"] == null ?null: row["PosFuncId"].ToString();
                ddlPosByFunction.SelectedValue = Common.RetrieveddL(ddlPosByFunction, posFuncId, "99999");

                string supervisorId = row["SupervisorId"] == null ?null: row["SupervisorId"].ToString();
                ddlSupervisor.SelectedValue = Common.RetrieveddL(ddlSupervisor, supervisorId, "-1");

                txtBankAccNo.Text      = row["BankAccNo"].ToString().Trim();
                txtBasicSal.Text       = string.IsNullOrEmpty(row["BasicSalary"].ToString()) == true ? "" : row["BasicSalary"].ToString();
                txtBasicSal.ToolTip    = row["BasicSalary"].ToString().Trim();
                txtGrossSalary.Text    = string.IsNullOrEmpty(row["GrossSalary"].ToString()) == true ? "" : row["GrossSalary"].ToString();
                txtGrossSalary.ToolTip = row["GrossSalary"].ToString().Trim();

                hfDesig.Value    = ddlDesignation.SelectedValue.ToString();
                hfJobTitle.Value = ddlJobTitle.SelectedValue.ToString();
                hfSector.Value   = ddlSector.SelectedValue.ToString();
                hfDept.Value     = ddlDepartment.SelectedValue.ToString();
                hfUnit.Value     = ddlUnit.SelectedValue.ToString();
                hfGrade.Value    = ddlGrade.SelectedValue.ToString();

                hfPostingDiv.Value  = ddlDivision.SelectedValue.ToString();
                hfPostingDist.Value = ddlDistrict.SelectedValue.ToString();
                hfSalLoc.Value      = ddlSalaryLoc.SelectedValue.ToString();

                hfPostingPlace.Value  = ddlPostingPlace.SelectedValue.ToString();
                hfPosByFunction.Value = ddlPosByFunction.SelectedValue.ToString();
            }
        }
        else
        {
            lblMsg.Text         = "Employee code is not valid.";
            txtEmpID.Text       = "";
            lblName.Text        = "";
            lblDesignation.Text = "";
            lblDept.Text        = "";
            lblJoinDate.Text    = "";
            return;
        }
    }