Exemplo n.º 1
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;
    }
Exemplo n.º 2
0
 public void LoadPerson()
 {
     try
     {
         Session["BookingPersonList"] = BLLEmployeePosting.GetEmployeeWithPostingList(null);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }
Exemplo n.º 3
0
 public void LoadPerson()
 {
     try
     {
         Session["venueBookedPersonList"] = BLLEmployeePosting.GetEmployeeWithPostingList(null);
     }
     catch (Exception ex)
     {
         this.lblStatusMessageTitle.Text = "Error Status";
         this.lblStatusMessage.Text      = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
Exemplo n.º 4
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();
     }
 }
Exemplo n.º 5
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;
        }
    }
    protected void grdEmployee_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.CollapsiblePanelExtender1.Collapsed = true;
        //System.Threading.Thread.Sleep(1000);

        this.CollapsiblePanelExtender1.ClientState = "true";
        this.CollapsiblePanelExtender1.Collapsed   = true;


        string Name = Server.HtmlDecode(grdEmployee.Rows[grdEmployee.SelectedIndex].Cells[5].Text).ToString();
        int    id   = 0;
        List <ATTEmployeeLeave> lstEmployeeLeave = new List <ATTEmployeeLeave>();

        if (tabContainerEmpLeave.ActiveTabIndex == 0)
        {
            id = int.Parse(grdEmployee.Rows[grdEmployee.SelectedIndex].Cells[0].Text);
            txtEmpName.Text = Name;
            txtEmpName.Attributes.Add("ID", grdEmployee.Rows[grdEmployee.SelectedIndex].Cells[0].Text);
            lstEmployeeLeave = BLLEmployeeLeave.GetEmployeeLeave(id, "REQ");
            //grdEmployee.SelectedIndex = -1;
            Session["EmployeeLeave"]        = lstEmployeeLeave;
            grdLeaveApplications.DataSource = lstEmployeeLeave;
            grdLeaveApplications.DataBind();
        }
        else if (tabContainerEmpLeave.ActiveTabIndex == 1)
        {
            id = int.Parse(grdEmployee.Rows[grdEmployee.SelectedIndex].Cells[0].Text);
            txtRecName.Text = Name;
            txtRecName.Attributes.Add("ID", grdEmployee.Rows[grdEmployee.SelectedIndex].Cells[0].Text);
        }

        //Loading Leave Type Drop Down List

        if (tabContainerEmpLeave.ActiveTabIndex == 0)
        {
            int eid = int.Parse(txtEmpName.Attributes["ID"].ToString());
            List <ATTEmployeeLeave> LSTEmpDesLeave = BLLEmployeeLeave.GetEmpDesLeave(eid);
            //LSTEmpDesLeave.Insert(0, new ATTEmployeeLeave(0, 0, "-बिदाको किसिम छान्नुहोस्-"));
            ddlAppType.DataSource     = LSTEmpDesLeave;
            ddlAppType.DataTextField  = "LeaveType";
            ddlAppType.DataValueField = "LeaveTypeID";
            ddlAppType.DataBind();
            List <ATTLeaveTypeEmployee>    LSTLeaveTypeEmp = BLLLeaveTypeEmployee.GetLeaveTypeEmployee(null, eid);
            List <ATTLeaveTypeDesignation> LSTLeaveTypeDes = new List <ATTLeaveTypeDesignation>();
            int desID = 0;
            List <ATTEmployeePosting> LSTEmpPosting = BLLEmployeePosting.GetEmpPosting(double.Parse(eid.ToString()));
            if (LSTEmpPosting.Count > 0)
            {
                desID = LSTEmpPosting[0].DesID;
            }

            if (desID > 0)
            {
                LSTLeaveTypeDes = BLLLeaveTypeDesignation.GetLeaveTypeDesignation(null, desID);
                LSTLeaveTypeDes.Insert(0, new ATTLeaveTypeDesignation(0, "-बिदाको किसिम छान्नुहोस्-", 0, 0, "", 0, false, 0, false, "", "", ""));
            }
            //int? accrDays;
            if (LSTLeaveTypeEmp.Count < 1)
            {
                ddlAppType.DataSource     = LSTLeaveTypeDes;
                ddlAppType.DataTextField  = "LeaveType";
                ddlAppType.DataValueField = "LeaveTypeID";
                ddlAppType.DataBind();
            }
            else
            {
                List <ATTLeaveType> lstLeavetype = new List <ATTLeaveType>();
                foreach (ATTLeaveTypeEmployee var in LSTLeaveTypeEmp)
                {
                    ATTLeaveType attlv = new ATTLeaveType(var.LeaveTypeID, var.LeaveType, "");
                    lstLeavetype.Add(attlv);
                }
                if (desID > 0)
                {
                    foreach (ATTLeaveTypeEmployee var in LSTLeaveTypeEmp)
                    {
                        int i = LSTLeaveTypeDes.FindIndex(delegate(ATTLeaveTypeDesignation obj)
                        {
                            return(obj.LeaveTypeID != var.LeaveTypeID);
                        });
                        if (i > 0)
                        {
                            ATTLeaveType attlv = new ATTLeaveType(LSTLeaveTypeDes[i].LeaveTypeID, LSTLeaveTypeDes[i].LeaveType, "");
                            lstLeavetype.Add(attlv);
                        }
                    }
                }
                lstLeavetype.Insert(0, new ATTLeaveType(0, "-बिदाको किसिम छान्नुहोस्-", ""));
                ddlAppType.DataSource     = lstLeavetype;
                ddlAppType.DataTextField  = "LeaveTypeName";
                ddlAppType.DataValueField = "LeaveTypeID";
                ddlAppType.DataBind();
            }

            List <ATTEmployeeLeave> LSTEmpLeave = BLLEmployeeLeave.GetEmployeeLeave(eid, "REQ");
            Session["EmployeeLeave"] = LSTEmpLeave;


            if (BLLEmployeeLeave.GetEmployeeLeave(eid, "REQ").Count > 0)
            {
                PanelSearch.Enabled = true;
            }
            grdLeaveApplications.DataSource = LSTEmpLeave;
            grdLeaveApplications.DataBind();
        }
    }