示例#1
0
    protected void btnAddApplication_Click(object sender, EventArgs e)
    {
        if (this.grdEmployee.SelectedIndex == -1)
        {
            this.lblStatusMessage.Text = "**र्कपया कर्मचारी छान्नुहोस्";
            this.programmaticModalPopup.Show();
            return;
        }
        string msg = EmptyMessage("RetAppl");

        if (msg == "")
        {
            List <ATTRetirement> LSTEmpRetirement = new List <ATTRetirement>();
            ATTRetirement        objEmpRetirement = new ATTRetirement();
            objEmpRetirement.empID          = int.Parse(lblEmpName.Attributes["empid"].ToString());
            objEmpRetirement.orgID          = int.Parse(Session["OrgID"].ToString());
            objEmpRetirement.desID          = int.Parse(lblEmpName.Attributes["desid"].ToString());
            objEmpRetirement.createdDate    = lblEmpName.Attributes["createddate"].ToString();
            objEmpRetirement.postID         = int.Parse(lblEmpName.Attributes["postid"].ToString());
            objEmpRetirement.fromDate       = lblEmpName.Attributes["fromdate"].ToString();
            objEmpRetirement.retirementDate = this.txtRetirementAppDate.Text;
            objEmpRetirement.ApplDesc       = this.RetirementDescription.Text;
            if (this.rdoRetSelfYesNo.SelectedValue == "0")
            {
                objEmpRetirement.isSelf = "Y";
            }
            else
            {
                objEmpRetirement.isSelf = "N";
            }
            if (ddlEmpRetirementType.SelectedValue == "0")
            {
                objEmpRetirement.retirementType = "A";
            }
            else if (ddlEmpRetirementType.SelectedValue == "1")
            {
                objEmpRetirement.retirementType = "S";
            }
            objEmpRetirement.entryBy = Session["UserName"].ToString();
            if (this.grdRetirementData.SelectedIndex == -1)
            {
                objEmpRetirement.action = "A";
            }
            else if (this.grdRetirementData.SelectedIndex == -1)
            {
                objEmpRetirement.action = "E";
            }
            LSTEmpRetirement.Add(objEmpRetirement);
            Session["EmpRetirementAppl"]      = LSTEmpRetirement;
            this.grdRetirementData.DataSource = LSTEmpRetirement;
            this.grdRetirementData.DataBind();
            ClearControls(2);
        }
        else
        {
            this.lblStatusMessage.Text = msg;
            this.programmaticModalPopup.Show();
            return;
        }
    }
示例#2
0
    private ATTRetirement GetFilterAppl()
    {
        ATTRetirement objRet = new ATTRetirement();

        objRet.isDecided  = "N";
        objRet.isApproved = "N";
        return(objRet);
    }
示例#3
0
    private ATTRetirement GetFilterDec()
    {
        ATTRetirement objRetDec = new ATTRetirement();

        objRetDec.isDecided  = "N";
        objRetDec.isApproved = "N";
        return(objRetDec);
    }
示例#4
0
    private ATTRetirement GetFilterAppr()
    {
        ATTRetirement objRetAppr = new ATTRetirement();

        objRetAppr.isDecided  = "Y";
        objRetAppr.isApproved = "Y";
        return(objRetAppr);
    }
示例#5
0
    protected void btnAddDecision_Click(object sender, EventArgs e)
    {
        if (grdEmployee.SelectedIndex == -1)
        {
            this.lblStatusMessage.Text = "**र्कपया कर्मचारी छान्नुहोस्";
            this.programmaticModalPopup.Show();
            return;
        }
        string msg = EmptyMessage("RetDec");

        if (msg == "")
        {
            List <ATTRetirement> LSTRetDec = (List <ATTRetirement>)Session["EmpRetirementAppl"];
            ATTRetirement        objRetDec = LSTRetDec[this.grdRetirementData.SelectedIndex];
            int empid = LSTRetDec[this.grdRetirementData.SelectedIndex].empID;
            int decid = int.Parse(txtDecName.Attributes["ID"].ToString());
            if (empid == decid)
            {
                this.btnSubmit2.Enabled    = false;
                this.lblStatusMessage.Text = "**अर्को कर्मचारी छान्नुहोस्";
                this.programmaticModalPopup.Show();
                this.txtDecName.Text = "";
                this.txtDecName.Focus();
                return;
            }
            objRetDec.decisionBy   = decid;
            objRetDec.decisionDate = this.txtDecDate.Text;
            objRetDec.decisionDesc = this.txtDecDexcription.Text;
            if (this.chkDecision.Checked == true)
            {
                objRetDec.isDecided = "Y";
            }
            else
            {
                objRetDec.isDecided = "N";
            }
            objRetDec.action = "E";

            Session["EmpRetirementAppl"]      = LSTRetDec;
            this.grdRetirementData.DataSource = LSTRetDec;
            this.grdRetirementData.DataBind();
            this.btnSubmit2.Enabled = true;
            ClearControls(4);
        }
        else
        {
            this.lblStatusMessage.Text = msg;
            this.programmaticModalPopup.Show();
            return;
        }
    }
示例#6
0
        public static DataTable GetEmployeeRetirement(ATTRetirement objRetirement, string opt)
        {
            try
            {
                List <OracleParameter> ParamList = new List <OracleParameter>();
                string select = "";
                if (opt == "appl" || opt == "dec")
                {
                    select = "SELECT * FROM VW_EMP_RETIREMENT WHERE 1=1 ";
                    if (objRetirement.isDecided != "")
                    {
                        select += " AND IS_DECIDED=:IsDecided";
                        ParamList.Add(Utilities.GetOraParam(":IsDecided", objRetirement.isDecided, OracleDbType.Varchar2, ParameterDirection.Input));
                    }
                    if (objRetirement.isApproved != "")
                    {
                        select += " AND IS_APPROVED=:IsApproved";
                        ParamList.Add(Utilities.GetOraParam(":IsApproved", objRetirement.isApproved, OracleDbType.Varchar2, ParameterDirection.Input));
                    }
                }
                else if (opt == "appr")
                {
                    select = "SELECT * FROM VW_EMP_RETIREMENT WHERE 1=1 ";
                    if (objRetirement.isDecided != "")
                    {
                        select += " AND IS_DECIDED=:IsDecided";
                        ParamList.Add(Utilities.GetOraParam(":IsDecided", objRetirement.isDecided, OracleDbType.Varchar2, ParameterDirection.Output));
                    }
                    if (objRetirement.isApproved != "")
                    {
                        select += " AND IS_APPROVED=:IsApproved";
                        ParamList.Add(Utilities.GetOraParam(":IsApproved", objRetirement.isApproved, OracleDbType.Varchar2, ParameterDirection.Output));
                    }
                }
                GetConnection    conn = new GetConnection();
                OracleConnection obj  = conn.GetDbConn(Module.PMS);

                DataSet ds = SqlHelper.ExecuteDataset(obj, CommandType.Text, select, ParamList.ToArray());
                return((DataTable)ds.Tables[0]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#7
0
    private ATTRetirement GetFilter()
    {
        ATTRetirement EmployeeSearch = new ATTRetirement();

        if (this.txtFName.Text.Trim() != "")
        {
            EmployeeSearch.firstName = this.txtFName.Text.Trim();
        }
        if (this.txtMName.Text.Trim() != "")
        {
            EmployeeSearch.midName = this.txtMName.Text.Trim();
        }
        if (this.txtSurName.Text.Trim() != "")
        {
            EmployeeSearch.lastName = this.txtSurName.Text.Trim();
        }
        if (this.ddlGender.SelectedIndex > 0)
        {
            EmployeeSearch.gender = this.ddlGender.SelectedValue;
        }
        if (this.txtDOB.Text.Trim() != "")
        {
            EmployeeSearch.dob = this.txtDOB.Text.Trim();
        }
        if (this.ddlMarStatus.SelectedIndex > 0)
        {
            EmployeeSearch.maritalStatus = this.ddlMarStatus.SelectedValue;
        }
        if (this.ddlOrganization.SelectedIndex > 0)
        {
            EmployeeSearch.orgID = int.Parse(this.ddlOrganization.SelectedValue);
        }
        if (this.ddlDesignation.SelectedIndex > 0)
        {
            EmployeeSearch.desID = int.Parse(this.ddlDesignation.SelectedValue);
        }
        EmployeeSearch.desType = "O";
        EmployeeSearch.iniType = 3;

        return(EmployeeSearch);
    }
 public static List <ATTRetirement> SearchEmployee(ATTRetirement objEmpRet)
 {
     try
     {
         List <ATTRetirement> LSTEmpRet = new List <ATTRetirement>();
         foreach (DataRow row in DLLRetirement.SearchEmployee(objEmpRet).Rows)
         {
             ATTRetirement obj = new ATTRetirement();
             obj.empID = int.Parse(row["P_ID"].ToString());
             string first_name = row["FIRST_NAME"].ToString();
             string mid_name   = row["MID_NAME"].ToString();
             string sur_name   = row["SUR_NAME"].ToString();
             if (mid_name != "")
             {
                 obj.fullName = first_name + " " + mid_name + " " + sur_name;
             }
             else
             {
                 obj.fullName = first_name + " " + sur_name;
             }
             //obj.OrgEmpNo = int.Parse(row["ORG_EMP_NO"].ToString());
             obj.gender      = row["GENDER"].ToString();
             obj.orgID       = int.Parse(row["ORG_ID"].ToString());
             obj.orgName     = row["ORG_NAME"].ToString();
             obj.desID       = int.Parse(row["DES_ID"].ToString());
             obj.desName     = row["DES_NAME"].ToString();
             obj.desType     = row["DES_TYPE"].ToString();
             obj.createdDate = row["CREATED_DATE"].ToString();
             obj.postID      = int.Parse(row["POST_ID"].ToString());
             obj.fromDate    = row["POST_FROM_DATE"].ToString();
             obj.action      = "";
             LSTEmpRet.Add(obj);
         }
         return(LSTEmpRet);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#9
0
    protected void btnAddApprove_Click(object sender, EventArgs e)
    {
        if (grdEmployee.SelectedIndex == -1)
        {
            this.lblStatusMessage.Text = "**र्कपया कर्मचारी छान्नुहोस्";
            this.programmaticModalPopup.Show();
            return;
        }
        string msg = EmptyMessage("RetAppr");

        if (msg == "")
        {
            List <ATTRetirement> LSTRetAppr = (List <ATTRetirement>)Session["EmpRetirementAppl"];
            ATTRetirement        objRetDec  = new ATTRetirement();
            //objRetDec.appBy= this.txtApprName.Text;
            objRetDec.appDate = this.txtApprDate.Text;
            objRetDec.appDesc = this.txtApprDescription.Text;
            if (this.chkApprove.Checked == true)
            {
                objRetDec.isApproved = "Y";
            }
            else
            {
                objRetDec.isApproved = "N";
            }
            objRetDec.action = "E";
            LSTRetAppr.Add(objRetDec);
            this.grdRetirementData.DataSource = LSTRetAppr;
            this.grdRetirementData.DataBind();
            ClearControls(3);
        }
        else
        {
            this.lblStatusMessage.Text = msg;
            this.programmaticModalPopup.Show();
            return;
        }
    }
示例#10
0
        public static DataTable SearchEmployee(ATTRetirement objEmpRet)
        {
            try
            {
                string strSelect = "";
                strSelect = "SELECT * FROM VW_EMPLOYEE_WITH_POSTING WHERE 1=1";
                List <OracleParameter> ParamList = new List <OracleParameter>();
                if (objEmpRet.firstName != null)
                {
                    strSelect += "AND A.FIRST_NAME LIKE :firstName||'%'";
                    ParamList.Add(Utilities.GetOraParam(":firstName", objEmpRet.firstName, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                if (objEmpRet.midName != null)
                {
                    strSelect += " AND A.MID_NAME LIKE :midName||'%'";
                    ParamList.Add(Utilities.GetOraParam(":midName", objEmpRet.midName, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                if (objEmpRet.lastName != null)
                {
                    strSelect += " AND A.SUR_NAME LIKE :lastName||'%'";
                    ParamList.Add(Utilities.GetOraParam(":lastName", objEmpRet.lastName, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                if (objEmpRet.orgID > 0)
                {
                    strSelect += "AND ORG_ID = :orgID";
                    ParamList.Add(Utilities.GetOraParam(":OrgID", objEmpRet.orgID, OracleDbType.Int64, ParameterDirection.Input));
                }
                if (objEmpRet.postID > 0)
                {
                    strSelect += " AND POST_ID = :postID";
                    ParamList.Add(Utilities.GetOraParam(":postID", objEmpRet.postID, OracleDbType.Int64, ParameterDirection.Input));
                }
                if (objEmpRet.gender != null)
                {
                    strSelect += " AND GENDER= :gender";
                    ParamList.Add(Utilities.GetOraParam(":gender", objEmpRet.gender, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                if (objEmpRet.maritalStatus != null)
                {
                    strSelect += " AND MARTIAL_STATUS= :maritalStatus";
                    ParamList.Add(Utilities.GetOraParam(":maritalStatus", objEmpRet.maritalStatus, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                if (objEmpRet.maritalStatus != null)
                {
                    strSelect += " AND MARTIAL_STATUS= :maritalStatus";
                    ParamList.Add(Utilities.GetOraParam(":maritalStatus", objEmpRet.maritalStatus, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                if (objEmpRet.dob != null)
                {
                    strSelect += " AND DOB= :dob";
                    ParamList.Add(Utilities.GetOraParam(":dob", objEmpRet.dob, OracleDbType.Varchar2, ParameterDirection.Input));
                }
                strSelect += " ORDER BY ORG_ID";

                GetConnection    conn = new GetConnection();
                OracleConnection obj  = conn.GetDbConn(Module.PMS);

                DataSet ds = SqlHelper.ExecuteDataset(obj, CommandType.Text, strSelect, ParamList.ToArray());
                return((DataTable)ds.Tables[0]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static List <ATTRetirement> GetEmployeeRetirement(ATTRetirement objRetirement, string opt)
        {
            List <ATTRetirement> LST = new List <ATTRetirement>();

            try
            {
                if (opt == "appl")
                {
                    foreach (DataRow row in DLLRetirement.GetEmployeeRetirement(objRetirement, opt).Rows)
                    {
                        ATTRetirement objEmpRet = new ATTRetirement();
                        objEmpRet.empID          = int.Parse(row["EMP_ID"].ToString());
                        objEmpRet.orgID          = int.Parse(row["ORG_ID"].ToString());
                        objEmpRet.postID         = int.Parse(row["POST_ID"].ToString());
                        objEmpRet.desID          = int.Parse(row["DES_ID"].ToString());
                        objEmpRet.createdDate    = row["CREATED_DATE"].ToString();
                        objEmpRet.fromDate       = row["FROM_DATE"].ToString();
                        objEmpRet.fullName       = row["EMP_NAME"].ToString();
                        objEmpRet.gender         = row["GENDER"].ToString();
                        objEmpRet.retirementDate = row["RETIREMENT_DATE"].ToString();
                        objEmpRet.isSelf         = row["IS_SELF"].ToString();
                        objEmpRet.retirementType = row["RETIREMENT_TYPE"].ToString();
                        objEmpRet.ApplDesc       = row["APP_DESC"].ToString();
                        objEmpRet.isDecided      = row["IS_DECIDED"].ToString();
                        objEmpRet.isApproved     = row["IS_APPROVED"].ToString();
                        LST.Add(objEmpRet);
                    }
                }
                else if (opt == "dec")
                {
                    foreach (DataRow row in DLLRetirement.GetEmployeeRetirement(objRetirement, opt).Rows)
                    {
                        ATTRetirement objEmpRet = new ATTRetirement();
                        objEmpRet.empID          = int.Parse(row["EMP_ID"].ToString());
                        objEmpRet.orgID          = int.Parse(row["ORG_ID"].ToString());
                        objEmpRet.postID         = int.Parse(row["POST_ID"].ToString());
                        objEmpRet.desID          = int.Parse(row["DES_ID"].ToString());
                        objEmpRet.createdDate    = row["CREATED_DATE"].ToString();
                        objEmpRet.fromDate       = row["FROM_DATE"].ToString();
                        objEmpRet.fullName       = row["EMP_NAME"].ToString();
                        objEmpRet.gender         = row["GENDER"].ToString();
                        objEmpRet.retirementDate = row["RETIREMENT_DATE"].ToString();
                        objEmpRet.isSelf         = row["IS_SELF"].ToString();
                        objEmpRet.retirementType = row["RETIREMENT_TYPE"].ToString();
                        objEmpRet.ApplDesc       = row["APP_DESC"].ToString();
                        objEmpRet.decisionDate   = row["DECISION_DATE"].ToString();
                        if (row["DECISION_BY"] != System.DBNull.Value)
                        {
                            objEmpRet.decisionBy = int.Parse(row["DECISION_BY"].ToString());
                        }
                        objEmpRet.decPerson    = row["DECISION_PERSON"].ToString();
                        objEmpRet.decisionDesc = row["DECISION_DESC"].ToString();
                        objEmpRet.isDecided    = row["IS_DECIDED"].ToString();
                        objEmpRet.isApproved   = row["IS_APPROVED"].ToString();
                        LST.Add(objEmpRet);
                    }
                }
                else if (opt == "appr")
                {
                    foreach (DataRow row in DLLRetirement.GetEmployeeRetirement(objRetirement, opt).Rows)
                    {
                        ATTRetirement objEmpRet = new ATTRetirement();
                        objEmpRet.empID          = int.Parse(row["EMP_ID"].ToString());
                        objEmpRet.orgID          = int.Parse(row["ORG_ID"].ToString());
                        objEmpRet.postID         = int.Parse(row["POST_ID"].ToString());
                        objEmpRet.createdDate    = row["CREATED_DATE"].ToString();
                        objEmpRet.fromDate       = row["FROM_DATE"].ToString();
                        objEmpRet.fullName       = row["EMP_NAME"].ToString();
                        objEmpRet.gender         = row["GENDER"].ToString();
                        objEmpRet.retirementDate = row["RETIREMENT_DATE"].ToString();
                        objEmpRet.isSelf         = row["IS_SELF"].ToString();
                        objEmpRet.retirementType = row["RETIREMENT_TYPE"].ToString();
                        objEmpRet.ApplDesc       = row["APP_DESC"].ToString();
                        objEmpRet.decisionDate   = row["DECISION_DATE"].ToString();
                        objEmpRet.decisionBy     = int.Parse(row["DECISION_BY"].ToString());
                        objEmpRet.decPerson      = row["DECISION_PERSON"].ToString();
                        objEmpRet.decisionDesc   = row["DECISION_DESC"].ToString();
                        objEmpRet.appDate        = row["APP_DATE"].ToString();
                        if (row["APP_BY"] != System.DBNull.Value)
                        {
                            objEmpRet.appBy = int.Parse(row["APP_BY"].ToString());
                        }
                        objEmpRet.apprPerson = row["APP_PERSON"].ToString();
                        objEmpRet.appDesc    = row["APP_DESC"].ToString();
                        objEmpRet.isDecided  = row["IS_DECIDED"].ToString();
                        objEmpRet.isApproved = row["IS_APPROVED"].ToString();
                        LST.Add(objEmpRet);
                    }
                }
                return(LST);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }