public static List <ATTEmployeePosting> GetEmployeeWithPostingList(int?orgID)
        {
            try
            {
                List <ATTEmployeePosting> lst = new List <ATTEmployeePosting>();

                DataTable tbl = new DataTable();
                tbl = DLLEmployeePosting.GetEmployeeWithPostingListTable(orgID);

                foreach (DataRow row in tbl.Rows)
                {
                    ATTEmployeePosting obj = new ATTEmployeePosting();
                    obj.OrgID   = int.Parse(row["ORG_ID"].ToString());
                    obj.EmpID   = int.Parse(row["P_ID"].ToString());
                    obj.EmpName = row["FIRST_NAME"].ToString() + " " +
                                  (row["MID_NAME"].ToString() == "" ? "" : row["MID_NAME"].ToString()) + " " +
                                  (row["SUR_NAME"].ToString() == "" ? "" : row["SUR_NAME"].ToString());
                    obj.DesID   = int.Parse(row["DES_ID"].ToString());
                    obj.DesName = row["DES_NAME"].ToString();


                    lst.Add(obj);
                }

                return(lst);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Пример #2
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        ATTUserLogin         user   = ((ATTUserLogin)Session["Login_User_Detail"]);
        ATTEmployeeDeputaion obj    = (ATTEmployeeDeputaion)Session["EmployeeDuptation"];
        ATTEmployeePosting   objEcp = (ATTEmployeePosting)Session["EmployeeCurentPosting"];

        obj.EmpID           = user.PID;
        obj.OrgID           = user.OrgID;
        obj.DesID           = objEcp.DesID;
        obj.CreatedDate     = objEcp.CreatedDate;
        obj.PostID          = objEcp.PostID;
        obj.FromDate        = objEcp.FromDate;
        obj.ApplicationDate = txtAppdate_DT.Text;
        obj.DepOrgID        = int.Parse(ddlOrganization.SelectedValue);
        //obj.DecisionVerifiedBy = "";
        //obj.LeaveDate = "";
        //obj.LeaveVerifiedBy = "";
        //obj.ReturnDate = "";
        //obj.ReturnVerifiedBy = "";
        obj.Responsibilities = txtdescription.Text;
        obj.Active           = "Y";
        obj.EntryBy          = user.UserName;
        //obj.TipOrgID = "";
        // obj.TippaniID = "";
        //obj.DecisionDate = "";
        obj.Action = "A";
        if (this.ddlOrganization.SelectedIndex <= 0)
        {
            this.lblStatusMessage.Text = "Please select organization Name.";
            this.programmaticModalPopup.Show();
            this.lblStatus.Focus();
            return;
        }
        if (this.txtAppdate_DT.Text == "")
        {
            this.lblStatusMessage.Text = "Please Enter Application Date.";
            this.programmaticModalPopup.Show();
            this.lblStatus.Focus();
            return;
        }
        if (this.txtdescription.Text == "")
        {
            this.lblStatusMessage.Text = "Please Enter Responsibilities.";
            this.programmaticModalPopup.Show();
            this.lblStatus.Focus();
            return;
        }

        if (BLLEmployeeDeputation.AddEmpForDeputationDetail(obj))
        {
            this.lblStatusMessage.Text = "Information Saved";
            this.programmaticModalPopup.Show();
        }
        else
        {
            this.lblStatusMessage.Text = "Information could not be Saved";
            this.programmaticModalPopup.Show();
        }
        ClearControl();
    }
        public static List <ATTEmployeePosting> GetEmployeePostingHistory(int empID, int?orgID)
        {
            try
            {
                List <ATTEmployeePosting> lst = new List <ATTEmployeePosting>();

                DataTable tbl = new DataTable();
                tbl = DLLEmployeePosting.GetEmployeePostingHistory(empID, orgID);

                foreach (DataRow row in tbl.Rows)
                {
                    ATTEmployeePosting obj = new ATTEmployeePosting();

                    obj.EmpID           = int.Parse(row["EMP_ID"].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.PostingTypeID   = int.Parse(row["POSTING_TYPE_ID"].ToString());
                    obj.PostingTypeName = row["POSTING_TYPE_NAME"].ToString();
                    obj.FromDate        = row["FROM_DATE"].ToString();
                    obj.CreatedDate     = row["CREATED_DATE"].ToString();
                    obj.PostID          = int.Parse(row["POST_ID"].ToString());
                    //obj.FromDate = row["FROM_DATE"].ToString();
                    lst.Add(obj);
                }

                return(lst);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Пример #4
0
    void LoadEmpCurentPostingInfo(double empid)
    {
        ATTUserLogin       user = ((ATTUserLogin)Session["Login_User_Detail"]);
        ATTEmployeePosting obj  = BLLEmployeePosting.GetEmployeeCurrentPostingAllInfo(empid);

        Session["EmployeeCurentPosting"] = obj;
        txtName.Text        = user.UserName;
        txtCurrentOrg.Text  = obj.OrgName;
        txtCurrentPost.Text = obj.PostName;
    }
 public void SetPostingDetail(ATTEmployeePosting post)
 {
     this.ddlOrg_Rqd.SelectedValue           = post.OrgID.ToString();
     this.ddlPostingType_rqd.SelectedValue   = post.DesID.ToString();
     this.ddlAvailablePost_Rqd.SelectedValue = post.PostID.ToString();
     this.ddlPostingType_rqd.SelectedValue   = post.PostingTypeID.ToString();
     this.txtPostingDate_Rdt.Text            = post.FromDate;
     this.txtDecisionDate_Dt.Text            = post.DecisionDate;
     this.txtLeaveDate_Dt.Text   = post.LeaveDate;
     this.txtJoiningDate_Dt.Text = post.JoiningDate;
 }
        public static List <ATTEmployeePosting> GetEmployeeAllPosting(object obj, double empID)
        {
            try
            {
                List <ATTEmployeePosting> PostingList = new List <ATTEmployeePosting>();
                foreach (DataRow row in DLLEmployeePosting.GetEmployeeAllPosting(empID, obj).Rows)
                {
                    ATTEmployeePosting Posting = new ATTEmployeePosting
                                                 (
                        double.Parse(row["EMP_ID"].ToString()),
                        int.Parse(row["ORG_ID"].ToString()),
                        int.Parse(row["DES_ID"].ToString()),
                        (row["CREATED_DATE"] == System.DBNull.Value ? "" : (string)row["CREATED_DATE"]),
                        int.Parse(row["POST_ID"].ToString()),
                        (row["FROM_DATE"] == System.DBNull.Value ? "" : (string)row["FROM_DATE"]),
                        int.Parse(row["POSTING_TYPE_ID"].ToString()),
                        ""
                                                 );

                    Posting.OrgName         = (row["ORG_NAME"] == System.DBNull.Value ? "" : (string)row["ORG_NAME"]);
                    Posting.DesName         = (row["DES_NAME"] == System.DBNull.Value ? "" : (string)row["DES_NAME"]);
                    Posting.PostName        = (row["POST_NAME"] == System.DBNull.Value ? "" : (string)row["POST_NAME"]);
                    Posting.PostingTypeName = (row["POSTING_TYPE_NAME"] == System.DBNull.Value ? "" : (string)row["POSTING_TYPE_NAME"]);
                    Posting.ToDate          = (row["TO_DATE"] == System.DBNull.Value ? "" : (string)row["TO_DATE"]);
                    Posting.JoiningDate     = (row["JOINING_DATE"] == System.DBNull.Value ? "" : (string)row["JOINING_DATE"]);
                    Posting.DecisionDate    = (row["DECISION_DATE"] == System.DBNull.Value ? "" : (string)row["DECISION_DATE"]);
                    Posting.LeaveDate       = (row["LEAVE_DATE"] == System.DBNull.Value ? "" : (string)row["LEAVE_DATE"]);
                    if (row["SALARY"].ToString() != "")
                    {
                        Posting.EmpSalary = int.Parse(row["SALARY"].ToString());
                    }
                    if (row["ALLOWANCE"].ToString() != "")
                    {
                        Posting.EmpAllowance = int.Parse(row["ALLOWANCE"].ToString());
                    }
                    Posting.EmpKitaabDartaNo         = (row["KITAAB_DARTAA_NO"] == System.DBNull.Value ? "" : (string)row["KITAAB_DARTAA_NO"]);
                    Posting.EmpPostingRemarks        = (row["REMARKS"] == System.DBNull.Value ? "" : (string)row["REMARKS"]);
                    Posting.PostingAttachmentDocs    = row["ATTACHMENT"] as byte[];
                    Posting.PostingAttachmentContent = (row["ATTACHMENT_FILE_NAME"] == System.DBNull.Value ? "" : (string)row["ATTACHMENT_FILE_NAME"]);
                    Posting.EntryBy = "";
                    PostingList.Add(Posting);
                }
                return(PostingList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #7
0
 protected void btnViewReport_Click(object sender, EventArgs e)
 {
     if (this.grdEmployee.SelectedIndex > -1)
     {
         ATTEmployeePosting empPosting = BLLEmployeePosting.GetEmployeeCurrentPosting(int.Parse(Session["EmpID"].ToString()));
         int DesID = (int)empPosting.DesID;
         Session["DesID"] = DesID;
         Print(int.Parse(Session["EmpID"].ToString()), DesID);
     }
     else
     {
         this.lblStatusMessage.Text = "कर्मचारी छान्नुहोस्";
         this.programmaticModalPopup.Show();
     }
 }
        public static ATTEmployeePosting GetEmployeeCurrentPosting(double empID)
        {
            try
            {
                string val    = DLLEmployeePosting.GetEmployeeCurrentPosting(empID);
                int    i      = val.IndexOf(" ");
                String desgID = val.Substring(0, i + 1);

                ATTEmployeePosting OBJ = new ATTEmployeePosting();
                OBJ.DesID   = int.Parse(desgID);
                OBJ.DesName = val.Substring(i, val.Length - 1);
                return(OBJ);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #9
0
    protected void grdEmployee_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "Print")
            {
                //GetConnection Conn = new GetConnection();
                //OracleConnection DBConn;
                //DBConn = Conn.GetDbConn(Module.PMS);
                //object obj = DBConn;
                int empID = int.Parse(e.CommandArgument.ToString());
                ATTEmployeePosting empPosting = BLLEmployeePosting.GetEmployeeCurrentPosting(empID);

                int desID = (int)empPosting.DesID;
                Print(empID, desID);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
        public static ATTEmployeePosting GetEmployeeCurrentPostingAllInfo(double empID)
        {
            try
            {
                string val = DLLEmployeePosting.GetEmployeeCurrentPostingAllInfo(empID);

                string[] arr = val.Split('#');

                ATTEmployeePosting obj = new ATTEmployeePosting();
                obj.OrgID       = int.Parse(arr[0].ToString());// returns organization ID
                obj.OrgName     = arr[1].ToString();
                obj.DesID       = int.Parse(arr[2].ToString());
                obj.DesName     = arr[3].ToString();
                obj.CreatedDate = arr[4].ToString();
                obj.PostID      = int.Parse(arr[5].ToString());
                obj.PostName    = arr[6].ToString();
                obj.FromDate    = arr[7].ToString();
                return(obj);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }