Ejemplo n.º 1
0
        // Bind GrdSearchFaculty GrdSearchFaculty_DL
        #region [Faculty ICard]

        public DataSet FacultyIcard_DL(EWA_StaffView objEWA)
        {
            //throw new NotImplementedException();
            DataSet ds = new DataSet();

            try
            {
                prmList    = new string[6];
                prmList[0] = "@Action";
                prmList[1] = "GetEmployeeProfileData";
                prmList[2] = "@OrgId";
                prmList[3] = Convert.ToString(objEWA.OrgId);
                prmList[4] = "@EmpCode";
                prmList[5] = Convert.ToString(objEWA.EmpCode);

                ds = ObjHelper.FillControl(prmList, "SP_Employee");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    return(ds);
                }
                else
                {
                }
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        //Faculty Data
        #region [Faculty Data]

        public DataSet DL_FacultyData(EWA_StaffView objEWA)
        {
            DataSet ds = new DataSet();

            try
            {
                prmList    = new string[6];
                prmList[0] = "@Action";
                prmList[1] = "FacultyProfile";
                prmList[2] = "@OrgId";
                prmList[3] = Convert.ToString(objEWA.OrgId);
                prmList[4] = "@EmpCode";
                prmList[5] = objEWA.EmpCode;

                //Stored procedure name
                ds = ObjHelper.FillControl(prmList, "SP_Employee");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    return(ds);
                }
                else
                {
                }
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 3
0
        //Bind Faculty Data
        #region [Bind Faculty Data]

        public DataSet DL_BindFacultyData(EWA_StaffView objEWA)
        {
            DataSet ds = new DataSet();

            try
            {
                prmList    = new string[8];
                prmList[0] = "@Action";
                prmList[1] = "GetEmployeeProfile";
                prmList[2] = "@OrgId";
                prmList[3] = objEWA.OrgId.ToString();
                prmList[4] = "@DepartmentId";
                prmList[5] = objEWA.DepartmentId;
                prmList[6] = "@DesignationId";
                prmList[7] = objEWA.Designation;
                //Stored procedure name
                ds = ObjHelper.FillControl(prmList, "SP_Employee");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    return(ds);
                }
                else
                {
                }
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 4
0
        //Delete Faculty
        #region [Delete Faculty]

        public int DeleteFaculty_BL(EWA_StaffView objEWA)
        {
            try
            {
                DL_StaffView ObjDL = new DL_StaffView();
                return(ObjDL.DeleteFaculty_DL(objEWA));
            }
            catch (Exception)
            {
                return(0);
            }
        }
Ejemplo n.º 5
0
        //Faculty Data
        #region StaffView

        public DataSet BL_ViewFacultyData(EWA_StaffView objEWA)
        {
            try
            {
                DL_StaffView objDL = new DL_StaffView();
                DataSet      ds    = objDL.DL_FacultyData(objEWA);
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 6
0
        //#region StaffView
        //public DataSet BL_StaffViewId(EWA_StaffView objEWA)
        //{
        //    try
        //    {
        //        DL_StaffView objDL = new DL_StaffView();
        //        DataSet ds = objDL.DL_ShowStaffViewProfile(objEWA);
        //        return ds;
        //    }
        //    catch (Exception)
        //    {
        //        throw;

        //    }
        //    finally
        //    {
        //    }
        //}
        //#endregion


        public DataSet FacultyIcard_BL(EWA_StaffView objEWA)
        {
            try
            {
                DL_StaffView objDL = new DL_StaffView();
                DataSet      ds    = objDL.FacultyIcard_DL(objEWA);
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 7
0
        //#region Editing record
        //public DataSet FacultyViewf_BL(EWA_StaffView objEWA)
        //{
        //    try
        //    {
        //        DL_StaffView objDL = new DL_StaffView();
        //        DataSet ds = objDL.DL_ShowStaffViewProfilef(objEWA);
        //        return ds;
        //    }
        //    catch (Exception)
        //    {
        //        throw;
        //    }
        //    finally
        //    {
        //    }
        //}
        //#endregion

        //#region Editing record
        //public DataSet BL_StaffViewIdf(EWA_StaffView objEWA)
        //{
        //    try
        //    {
        //        DL_StaffView objDL = new DL_StaffView();
        //        DataSet ds = objDL.FacultyIcardf_DL(objEWA);
        //        return ds;
        //    }
        //    catch (Exception)
        //    {
        //        throw;
        //    }
        //    finally
        //    {
        //    }

        //}
        //#endregion
        #endregion

        //Update Faculty
        #region Editing record

        public int BL_UpdateFaculty(EWA_StaffView objEWA)
        {
            try
            {
                DL_StaffView objDL = new DL_StaffView();
                int          flag  = 0;// = objDL.UpdateFaculty_DL(objEWA);
                return(flag);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 8
0
        protected void lnkBtnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                lock (this)
                {
                    LinkButton  lnkBtnId = (LinkButton)sender;
                    GridViewRow grdrow   = lnkBtnId.NamingContainer as GridViewRow;
                    //ViewState["StudentUserCode"]
                    //Session["EmpUserCode1"] = grd.DataKeys[grdrow.RowIndex].Values["UserCode"].ToString();

                    EWA_StaffView objEWA = new EWA_StaffView();
                    BL_StaffView  objBAL = new BL_StaffView();
                    string        msgact = "";
                    objEWA.Action  = "DeleteProfile";
                    objEWA.StaffID = Convert.ToInt32(grd.DataKeys[grdrow.RowIndex].Values["UserCode"].ToString());
                    objEWA.OrgId   = Convert.ToInt32(Session["OrgId"]);
                    if (Convert.ToBoolean(grd.DataKeys[grdrow.RowIndex].Values["IsActive"].ToString()))
                    {
                        objEWA.IsActive = 0;
                        msgact          = "Deactivate";
                    }
                    else
                    {
                        objEWA.IsActive = 1;
                        msgact          = "activate";
                    }


                    int result = objBAL.DeleteFaculty_BL(objEWA);

                    if (result > 0)
                    {
                        msgBox.ShowMessage("Faculty is " + msgact + "..! ", "Successfull", UserControls.MessageBox.MessageStyle.Successfull);
                        select_qry();
                    }
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
                // throw;
            }
        }
Ejemplo n.º 9
0
        //Bind Faculty grid
        #region [Bind Faculty Grid]

        private void BindFacultyGrid()
        {
            try
            {
                EWA_StaffView objEWA = new EWA_StaffView();
                BL_StaffView  objBAL = new BL_StaffView();

                objEWA.OrgId = Convert.ToInt32(Session["OrgId"]);

                objEWA.DepartmentId = ddlDepartment.SelectedValue;
                objEWA.Designation  = ddlDesignation.SelectedValue;

                DataSet ds = new DataSet();

                ds = objBAL.FacultyView_BL(objEWA);

                if (ds.Tables[0].Rows.Count == 0 || ds == null)
                {
                    ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());
                    grdSearchFaculty.DataSource = ds;
                    grdSearchFaculty.DataBind();
                    int columncount = grdSearchFaculty.Rows[0].Cells.Count;
                    grdSearchFaculty.Rows[0].Cells.Clear();
                    grdSearchFaculty.Rows[0].Cells.Add(new TableCell());
                    grdSearchFaculty.Rows[0].Cells[0].ColumnSpan = columncount;
                    grdSearchFaculty.Rows[0].Cells[0].Text       = "No Records Found";
                }
                else
                {
                    grdSearchFaculty.DataSource = ds.Tables[0];
                    grdSearchFaculty.DataBind();
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
        protected void btnGo_Click(object sender, EventArgs e)
        {
            Panel3.Visible = true;
            BL_StaffView  objBAL = new BL_StaffView();
            EWA_StaffView objEWA = new EWA_StaffView();

            try
            {
                objEWA.Designation  = ddlDesignation.SelectedValue;
                objEWA.DepartmentId = ddlDepartment.SelectedValue;
                objEWA.OrgId        = Convert.ToInt32(Session["OrgId"]);
                DataSet ds = new DataSet();

                ds = objBAL.BL_GetFacultyIcardData(objEWA);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    grdIcard.DataSource = ds.Tables[0];
                    grdIcard.DataBind();
                    btnPrintLoad.Visible = true;
                }
                else
                {
                    DataTable dt = new DataTable();
                    //dt.Columns.Add("UserCode");
                    //dt.Columns.Add("FullName");
                    //dt.Rows.Add();
                    //dt.Rows.Add();
                    grdIcard.DataSource = dt;
                    grdIcard.DataBind();
                    btnPrintLoad.Visible = false;
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Ejemplo n.º 11
0
        //Commented
        #region [Commented]
        // Update Staff
        //public int UpdateFaculty_DL(EWA_StaffView objEWA)
        //{
        //    try
        //    {
        //        cmd = new SqlCommand("SP_Staff", con);
        //        cmd.CommandType = CommandType.StoredProcedure;

        //        //personal Information
        //        cmd.Parameters.AddWithValue("@Action", objEWA.Action);
        //        cmd.Parameters.AddWithValue("@FirstName", objEWA.FirstName);
        //        cmd.Parameters.AddWithValue("@MiddleName", objEWA.MiddleName);
        //        //cmd.Parameters.AddWithValue("@LastName", objEWA.LastName);

        //        //cmd.Parameters.AddWithValue("@MotherName", objEWA.MotherName);
        //        //cmd.Parameters.AddWithValue("@Gender", objEWA.Gender);
        //        //cmd.Parameters.AddWithValue("@DOB", objEWA.DOB);
        //        //cmd.Parameters.AddWithValue("@BloodGroup", objEWA.BloodGroup);
        //        //cmd.Parameters.AddWithValue("@MaritalStatus", objEWA.MaritalStatus);

        //        //Contact Information
        //        //cmd.Parameters.AddWithValue("@PresentAddress", objEWA.PresentAddress);
        //        //cmd.Parameters.AddWithValue("@PresentCountry", objEWA.PresentCountry);
        //        //cmd.Parameters.AddWithValue("@PresentState", objEWA.PresentState);
        //        //cmd.Parameters.AddWithValue("@PresentCity", objEWA.PresentCity);
        //        //cmd.Parameters.AddWithValue("@PresentPinCode", objEWA.PresentPinCode);
        //        //cmd.Parameters.AddWithValue("@PermanentAddress", objEWA.PermanentAddress);
        //        //cmd.Parameters.AddWithValue("@PermanentCountry", objEWA.PermanentCountry);
        //        //cmd.Parameters.AddWithValue("@PermanentState", objEWA.PermanentState);
        //        //cmd.Parameters.AddWithValue("@PermanentCity", objEWA.PermanentCity);
        //        //cmd.Parameters.AddWithValue("@PermanentPinCode", objEWA.PermanentPinCode);
        //        //cmd.Parameters.AddWithValue("@PhoneNo", objEWA.PhoneNo);
        //        //cmd.Parameters.AddWithValue("@Mobile", objEWA.Mobile);
        //        //cmd.Parameters.AddWithValue("@Fax", objEWA.Fax);
        //        //cmd.Parameters.AddWithValue("@Email", objEWA.Email);
        //        //cmd.Parameters.AddWithValue("@CasteCategory", objEWA.CasteCategory);
        //        //cmd.Parameters.AddWithValue("@Nationality", objEWA.Nationality);
        //        //cmd.Parameters.AddWithValue("@WebsiteBlog", objEWA.WebsiteBlog);
        //        //cmd.Parameters.AddWithValue("@PanCardNo", objEWA.PanCardNo);
        //        //cmd.Parameters.AddWithValue("@DateOfJoining", objEWA.DateOfJoining);

        //        //Education Qualification
        //        //cmd.Parameters.AddWithValue("@UGDegree", objEWA.UGDegree);
        //        //cmd.Parameters.AddWithValue("@PGDegree", objEWA.PGDegree);
        //        //cmd.Parameters.AddWithValue("@DoctrateDegree", objEWA.DoctrateDegree);
        //        //cmd.Parameters.AddWithValue("@OtherQualification", objEWA.OtherQualification);
        //        //cmd.Parameters.AddWithValue("@Specialization", objEWA.Specialization);
        //        //cmd.Parameters.AddWithValue("@TeachingExperience", objEWA.TeachingExperience);
        //        //cmd.Parameters.AddWithValue("@IndustrialExperience", objEWA.IndustrialExperience);
        //        //cmd.Parameters.AddWithValue("@ResearchExperience", objEWA.ResearchExperience);
        //        //cmd.Parameters.AddWithValue("@NationalPublication", objEWA.NationalPublication);
        //        //cmd.Parameters.AddWithValue("@InternationalPublication", objEWA.InternationalPublication);
        //        //cmd.Parameters.AddWithValue("@BookPublished", objEWA.BookPublished);
        //        //cmd.Parameters.AddWithValue("@Patents", objEWA.Patents);

        //        //Other Information
        //        //cmd.Parameters.AddWithValue("@PFNumber", objEWA.PFNumber);
        //        //cmd.Parameters.AddWithValue("@BankAccountNumber", objEWA.BankAccountNumber);
        //        //cmd.Parameters.AddWithValue("@BankName", objEWA.BankName);
        //        //cmd.Parameters.AddWithValue("@BankBranchName", objEWA.BankBranchName);
        //        //cmd.Parameters.AddWithValue("@BankIFSCCode", objEWA.BankIFSCCode);

        //        //cmd.Parameters.AddWithValue("@OrgId", objEWA.OrgId);
        //        //// cmd.Parameters.AddWithValue("@OrgId", objEWA.OrgId);
        //        //cmd.Parameters.AddWithValue("@StaffID", objEWA.StaffID);
        //        ////cmd.Parameters.AddWithValue("@UserId", objEWA.UserId);
        //        //cmd.Parameters.AddWithValue("@TransDate", objEWA.TransDate);
        //        //cmd.Parameters.AddWithValue("@IsActive", objEWA.IsActive);
        //        con.Open();
        //        int flag = cmd.ExecuteNonQuery();
        //        con.Close();
        //        return flag;
        //    }
        //    catch (Exception)
        //    {
        //        // throw;
        //    }
        //    //return ds;
        //}
        #endregion


        //Delete Faculty
        #region [Delete Faculty]

        public int DeleteFaculty_DL(EWA_StaffView objEWA)
        {
            int flag = 0;

            try
            {
                SqlCommand cmd = new SqlCommand();
                cmd             = new SqlCommand("SP_Employee", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Action", objEWA.Action);
                cmd.Parameters.AddWithValue("@UserCode", objEWA.StaffID);
                cmd.Parameters.AddWithValue("@OrgId", objEWA.OrgId);
                cmd.Parameters.AddWithValue("@IsActive", objEWA.IsActive);
                con.Open();
                flag = cmd.ExecuteNonQuery();
                con.Close();
                return(flag);
            }
            catch (Exception)
            {
                return(flag);
            }
        }