Exemplo n.º 1
0
        //Get Employee Record
        #region [Get Employee Record]

        public DataSet DL_GetEmployeeRecord(EWA_Faculty objEWA)
        {
            DataSet ds = new DataSet();

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

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

        public DataSet DL_ShowFacultyProfile(EWA_Faculty objEWA)
        {
            DataSet ds = new DataSet();

            try
            {
                prmList    = new string[6];
                prmList[0] = "@Action";
                //Stored procedure Action value
                prmList[1] = "FacultyViewProfile";
                prmList[2] = "@OrgId";
                prmList[3] = Convert.ToString(objEWA.OrgId);
                prmList[4] = "@UserCode";
                prmList[5] = Convert.ToString(objEWA.StaffId);

                //Stored procedure name
                ds = ObjHelper.FillControl(prmList, "SP_Employee");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    return(ds);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception)
            {
                // GeneralErr(exp.Message.ToString());
                throw;
            }
        }
Exemplo n.º 3
0
        //Faculty Profile
        #region [Faculty Profile]

        public DataSet BL_ShowFacultyProfile(EWA_Faculty objEWA)
        {
            try
            {
                DL_Faculty objDL = new DL_Faculty();
                DataSet    ds    = objDL.DL_ShowFacultyProfile(objEWA);
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 4
0
        //Update Faculty Profile
        #region [Update Faculty Profile]

        public int BL_UpdateFaculty(EWA_Faculty objEWA)
        {
            DL_Faculty objDL = new DL_Faculty();

            try
            {
                int flag = objDL.DL_UpdateFaculty(objEWA);
                return(flag);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 5
0
        //get Employee Record
        #region [get Employee Record]

        public DataSet BL_GetEmployeeRecord(EWA_Faculty objEWA)
        {
            try
            {
                DL_Faculty objDL = new DL_Faculty();
                //DataSet ds = objDL.UpdateStaffRecord_DL(objEWA);
                DataSet ds = objDL.DL_GetEmployeeRecord(objEWA);
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 6
0
        //Update Faculty
        #region [Update Faculty Profile]

        public int DL_UpdateFaculty(EWA_Faculty objEWA)
        {
            try
            {
                cmd             = new SqlCommand("SP_Employee", con);
                cmd.CommandType = CommandType.StoredProcedure;

                //personal Information
                cmd.Parameters.AddWithValue("@Action", objEWA.Action);
                //cmd.Parameters.AddWithValue("@Department", objEWA.Department);
                //cmd.Parameters.AddWithValue("@Designation", objEWA.Designation);
                //cmd.Parameters.AddWithValue("@Course", objEWA.Course);
                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.BirthDate);
                cmd.Parameters.AddWithValue("@BloodGroup", objEWA.BloodGroup);
                cmd.Parameters.AddWithValue("@MaritalStatus", objEWA.MaritalStatus);
                //pass OrgId and StaffId
                cmd.Parameters.AddWithValue("@OrgId", objEWA.OrgId);
                cmd.Parameters.AddWithValue("@UserCode", objEWA.EmployeeId);

                //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("@PhoneNumber", 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.DateoOfJoining);

                //Education Information
                cmd.Parameters.AddWithValue("@UGDegree", objEWA.UGDegree);
                cmd.Parameters.AddWithValue("@PGDegree", objEWA.PGDegree);
                //cmd.Parameters.AddWithValue("@DoctorateDegree", objEWA.Doctoratedegree);
                cmd.Parameters.AddWithValue("@OtherQualification", objEWA.OtherQualificaton);
                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.BooksPublished);
                //cmd.Parameters.AddWithValue("@Patents", objEWA.Patents);
                cmd.Parameters.AddWithValue("@Photo", objEWA.Photo);
                //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);

                con.Open();
                int flag = cmd.ExecuteNonQuery();

                con.Close();
                return(flag);
            }
            catch (Exception ex)
            {
                int err = ((System.Data.SqlClient.SqlException)(ex)).Number;
                if (err == 547 && objEWA.Action == "Delete")
                {
                    throw new SystemException("Record is in use !!!");
                }
                else
                {
                    throw ex;
                }
            }
        }
        //Faculty Profile
        #region [Faculty Profile]

        private void ShowFacultyProfile(EWA_Faculty objEWA)
        {
            DataSet ds;

            try
            {
                ds = objBAL.BL_ShowFacultyProfile(objEWA);

                //Personal Information
                lblStaffId.Text = ds.Tables[0].Rows[0]["UserCode"].ToString();
                //lblDepartment.Text = ds.Tables[0].Rows[0]["Department"].ToString();
                // lblFacultyType.Text = ds.Tables[0].Rows[0]["FacultyType"].ToString();
                // lblDesignation.Text = ds.Tables[0].Rows[0]["Designation"].ToString();
                //lblClass.Text = ds.Tables[0].Rows[0]["Course"].ToString();
                lblFirstName.Text  = ds.Tables[0].Rows[0]["FirstName"].ToString();
                lblMiddleName.Text = ds.Tables[0].Rows[0]["MiddleName"].ToString();
                lblLastName.Text   = ds.Tables[0].Rows[0]["LastName"].ToString();
                lblMotherName.Text = ds.Tables[0].Rows[0]["MotherName"].ToString();

                lblGender.Text        = ds.Tables[0].Rows[0]["Gender"].ToString();
                lblBirthDate.Text     = ds.Tables[0].Rows[0]["DOB"].ToString();
                lblBloodGroup.Text    = ds.Tables[0].Rows[0]["BloodGroup"].ToString();
                lblMaritalStatus.Text = ds.Tables[0].Rows[0]["MaritalStatus"].ToString();
                //lblUserName.Text = ds.Tables[0].Rows[0]["UserName"].ToString();
                //lblPassword.Text = ds.Tables[0].Rows[0]["Password"].ToString();

                //For Contact Information
                lblPresentAddress.Text   = ds.Tables[0].Rows[0]["PresentAddress"].ToString();
                lblPresentCountry.Text   = ds.Tables[0].Rows[0]["PresentCountry"].ToString();
                lblPresentState.Text     = ds.Tables[0].Rows[0]["PresentState"].ToString();
                lblPresentCity.Text      = ds.Tables[0].Rows[0]["PresentCity"].ToString();
                lblPinCode.Text          = ds.Tables[0].Rows[0]["PresentPinCode"].ToString();
                lblPermanentAddress.Text = ds.Tables[0].Rows[0]["PermanentAddress"].ToString();
                lblPermamentCountry.Text = ds.Tables[0].Rows[0]["PermanentCountry"].ToString();
                lblPermanentState.Text   = ds.Tables[0].Rows[0]["PermanentState"].ToString();
                lblPermanentCity.Text    = ds.Tables[0].Rows[0]["PermanentCity"].ToString();
                lblPermanentPincode.Text = ds.Tables[0].Rows[0]["PermanentPincode"].ToString();
                //ImgPhoto.ImageUrl = ds.Tables[0].Rows[0][""].ToString();

                lblPhoneNo.Text       = ds.Tables[0].Rows[0]["PhoneNumber"].ToString();
                lblMobile.Text        = ds.Tables[0].Rows[0]["Mobile"].ToString();
                lblFax.Text           = ds.Tables[0].Rows[0]["Fax"].ToString();
                lblEmail.Text         = ds.Tables[0].Rows[0]["Email"].ToString();
                lblCasteCategory.Text = ds.Tables[0].Rows[0]["CasteCategory"].ToString();
                lblNationality.Text   = ds.Tables[0].Rows[0]["Nationality"].ToString();
                lblWebsiteBlog.Text   = ds.Tables[0].Rows[0]["WebsiteBlog"].ToString();
                lblPanCardNo.Text     = ds.Tables[0].Rows[0]["PanCardNo"].ToString();

                //For Education Qualification
                lblDateOfJoining.Text      = ds.Tables[0].Rows[0]["DateOfJoining"].ToString();
                lblUGDegree.Text           = ds.Tables[0].Rows[0]["UGDegree"].ToString();
                lblPGDegree.Text           = ds.Tables[0].Rows[0]["PGDegree"].ToString();
                lblDoctorateDegree.Text    = ds.Tables[0].Rows[0]["DoctorateDegree"].ToString();
                lblOtherQualification.Text = ds.Tables[0].Rows[0]["OtherQualification"].ToString();
                lblSpecialization.Text     = ds.Tables[0].Rows[0]["Specialization"].ToString();
                lblTeachingExperience.Text = ds.Tables[0].Rows[0]["TeachingExperience"].ToString();
                // lblIndustrialExperience.Text = ds.Tables[0].Rows[0]["IndustrialExperience"].ToString();
                //lblReaserchExperience.Text = ds.Tables[0].Rows[0]["ReaserchExperience"].ToString();
                //lblNationalPublication.Text = ds.Tables[0].Rows[0]["NationalPublication"].ToString();
                // lblInternationalPublication.Text = ds.Tables[0].Rows[0]["InternationalPublication"].ToString();
                //lblBookPublished.Text = ds.Tables[0].Rows[0]["BookPublished"].ToString();
                //lblPatents.Text = ds.Tables[0].Rows[0]["Patents"].ToString();
                string StaffPhoto = ds.Tables[0].Rows[0]["Photo"].ToString();
                if (StaffPhoto != null && StaffPhoto != "")
                {
                    Byte[] bytes = (Byte[])ds.Tables[0].Rows[0]["Photo"];

                    string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
                    ImgStaff.ImageUrl = "data:image/png;base64," + base64String;
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }