Esempio n. 1
0
        private void FillEmployeeEntity()
        {
            string strSql = "";

            strSql = " SELECT epd_empid as ID,replace(convert(char(20),ltrim(EPD_FIRST_NAME  ))+ epd_empid,' ',' ' ) as NAME " +
                     " FROM ENT_employee_personal_dtls emp inner join ENT_EMPLOYEE_OFFICIAL_DTLS eod  " +
                     " on emp.EPD_EMPID=eod.EOD_EMPID where emp.EPD_ISDELETED='0' and eod.EOD_ACTIVE='1' ";
            //strSql = " select Left(EPD_FIRST_NAME + space(28),30) + epd_empid as Name ,epd_empid as ID from ENT_EMPLOYEE_PERSONAL_DTLS where epd_isdeleted='0' ";


            //strSql = "SELECT oce_id as ID,replace(convert(char(20),ltrim(OCE_DESCRIPTION  ))+ oce_id,' ',' ' ) as NAME FROM ent_org_common_entities where cem_entity_id='LOC' and  oce_isdeleted='0'";

            SqlConnection con = new SqlConnection(m_connections);

            con.Open();
            SqlCommand cmd = new SqlCommand(strSql, con);

            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstEmployee.DataValueField = "ID";
            LstEmployee.DataTextField  = "NAME";
            LstEmployee.DataSource     = thisDataSet.Tables[0];
            LstEmployee.DataBind();

            lstEmployDummy.DataValueField = "ID";
            lstEmployDummy.DataTextField  = "NAME";
            lstEmployDummy.DataSource     = thisDataSet.Tables[0];
            lstEmployDummy.DataBind();
        }
Esempio n. 2
0
        private void FillEmployeeEntity()
        {
            string strSql = "";

            strSql = "SELECT epd_empid as ID,replace(convert(char(20),ltrim(EPD_FIRST_NAME  ))+ epd_empid,' ',' ' ) as NAME " +
                     "  FROM ENT_employee_personal_dtls emp inner join ENT_EMPLOYEE_OFFICIAL_DTLS eod " +
                     "  on emp.EPD_EMPID=eod.EOD_EMPID where emp.EPD_ISDELETED='0' and eod.EOD_ACTIVE='1'  AND EPD_EMPID NOT IN (SELECT CC_EMP_ID FROM ACS_CARD_CONFIG WHERE ACE_isdeleted = '0')";



            SqlConnection con = new SqlConnection(m_connections);

            con.Open();
            SqlCommand     cmd         = new SqlCommand(strSql, con);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstEmployee.DataValueField = "ID";
            LstEmployee.DataTextField  = "NAME";
            LstEmployee.DataSource     = thisDataSet.Tables[0];
            LstEmployee.DataBind();
            lstEmployDummy.DataValueField = "ID";
            lstEmployDummy.DataTextField  = "NAME";
            lstEmployDummy.DataSource     = thisDataSet.Tables[0];
            lstEmployDummy.DataBind();
        }
Esempio n. 3
0
        private void fillEntities()
        {
            mgrId   = Session["uid"].ToString();
            levelId = Session["levelId"].ToString();
            SqlConnection con = new SqlConnection(m_connections);

            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            SqlCommand cmd = new SqlCommand("USP_GET_EMPDETAILS_ROLEWISE", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@EmployeeCode", mgrId);

            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }
            LstEmployee.DataValueField = "EOD_EMPID";
            LstEmployee.DataTextField  = "EmployeeName";
            LstEmployee.DataSource     = thisDataSet.Tables[0];
            LstEmployee.DataBind();

            lstEmployDummy.DataValueField = "EOD_EMPID";
            lstEmployDummy.DataTextField  = "EmployeeName";
            lstEmployDummy.DataSource     = thisDataSet.Tables[0];
            lstEmployDummy.DataBind();
        }
Esempio n. 4
0
        private void FillEmployeeEntity()
        {
            string strSql = "";

            strSql = "SELECT VehicleRegistrationNumber FROM [dbo].[veh_vehicleEntries]";
            //strSql = " select Left(EPD_FIRST_NAME + space(28),30) + epd_empid as Name ,epd_empid as ID from ENT_EMPLOYEE_PERSONAL_DTLS where epd_isdeleted='0' ";


            //strSql = "SELECT oce_id as ID,replace(convert(char(20),ltrim(OCE_DESCRIPTION  ))+ oce_id,' ',' ' ) as NAME FROM ent_org_common_entities where cem_entity_id='LOC' and  oce_isdeleted='0'";

            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            SqlCommand cmd = new SqlCommand(strSql, conn);

            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);
            LstEmployee.DataTextField = "VehicleRegistrationNumber";

            LstEmployee.DataSource = thisDataSet.Tables[0];

            LstEmployee.DataBind();
        }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         LstEmployee.DataBind();
     }
 }
Esempio n. 6
0
    protected void LstEmployee_DataBinding(object sender, EventArgs e)
    {
        OnlineSchoolEntities km = new OnlineSchoolEntities();
        var schoolId            = new SchoolInformation().getId();
        var semesterId          = MyDate.getCurrentSemesterId();

        var    isSeen = (from m in km.UsersGeneralizations select m.isSeen).FirstOrDefault();
        string IsSeenn;

        if (isSeen == false)
        {
            IsSeenn = "لا";
        }

        else
        {
            IsSeenn = "نعم";
        }


        var emp = (from k in km.UsersGeneralizations

                   select new
        {
            IsSeenn,
            EmployeeName = (from m in km.Employees where m.IdentityNumber == k.UserId select m.Name).FirstOrDefault()
        }).ToList();

        LstEmployee.DataSource = emp;
        LstEmployee.DataBind();
    }
Esempio n. 7
0
        private void FillEmployeeEntity()
        {
            /*
             * string strSql = "";
             * strSql = "SELECT  epd_empid as ID,replace(convert(char(20),ltrim(EPD_FIRST_NAME )) + epd_empid,' ',' ')   as NAME FROM ENT_employee_personal_dtls  where epd_isdeleted='0'";
             * SqlConnection con = new SqlConnection(m_connections);
             * con.Open();
             * SqlCommand cmd = new SqlCommand(strSql, con);
             * SqlDataAdapter adpt = new SqlDataAdapter(cmd);
             * DataSet thisDataSet = new DataSet();
             * adpt.Fill(thisDataSet);
             *
             * LstEmployee.DataValueField = "ID";
             * LstEmployee.DataTextField = "NAME";
             * LstEmployee.DataSource = thisDataSet.Tables[0];
             * LstEmployee.DataBind();
             */


            string strSql = "";

            //strSql = "SELECT EPD_EMPID as ID ,replace(convert(char(20),ltrim(EPD_FIRST_NAME  ))+ epd_empid,' ',' ' ) as NAME " +
            //         " FROM ENT_employee_personal_dtls emp inner join ENT_EMPLOYEE_OFFICIAL_DTLS eod  " +
            //         " on emp.EPD_EMPID=eod.EOD_EMPID where emp.EPD_ISDELETED='0' and eod.EOD_ACTIVE='1' ";

            strSql = "SELECT epd_empid as ID,replace(convert(char(20),ltrim(EPD_FIRST_NAME  ))+ epd_empid,' ',' ' ) as NAME " +
                     " FROM ENT_employee_personal_dtls  emp inner join ENT_EMPLOYEE_OFFICIAL_DTLS eod  on emp.EPD_EMPID=eod.EOD_EMPID " +
                     " where EPD_EMPID not in  (select etc_emp_id from TNA_EMPLOYEE_TA_CONFIG) " +
                     " and epd_isdeleted='0' and eod_active = '1' ";



            SqlConnection con = new SqlConnection(m_connections);

            con.Open();
            SqlCommand     cmd         = new SqlCommand(strSql, con);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstEmployee.DataValueField = "ID";
            LstEmployee.DataTextField  = "NAME";
            LstEmployee.DataSource     = thisDataSet.Tables[0];
            LstEmployee.DataBind();

            lstEmployDummy.DataValueField = "ID";
            lstEmployDummy.DataTextField  = "NAME";
            lstEmployDummy.DataSource     = thisDataSet.Tables[0];
            lstEmployDummy.DataBind();
        }
        private void FillEmployeeEntity()
        {
            try
            {
                string strSql = "";

                //strSql = "SELECT  epd_empid as ID,replace(convert(char(20),ltrim(EPD_FIRST_NAME )) + epd_empid,' ',' ')   as NAME FROM ENT_employee_personal_dtls emp "+
                //         " inner join ENT_EMPLOYEE_OFFICIAL_DTLS eop on emp.EPD_EMPID=eop.EOD_EMPID WHERE emp.EPD_ISDELETED='0' and eop.EOD_ACTIVE='1'  and emp.EPD_EMPID !='"+empId+"' ";
                strSql = " select replace(convert(char(40),READER_DESCRIPTION)+ltrim(READER_ID),' ',' ' ) as  ReaderNAME, Convert(varchar,READER_ID)+'-'+convert(varchar,CTLR_ID) as READER_ID  from ACS_READER  where READER_ISDELETED='0' ";


                //strSql = "SELECT oce_id as ID,replace(convert(char(20),ltrim(OCE_DESCRIPTION  ))+ oce_id,' ',' ' ) as NAME FROM ent_org_common_entities where cem_entity_id='LOC' and  oce_isdeleted='0'";
                if (conn.State == ConnectionState.Closed)
                {
                    conn.Open();
                }
                SqlCommand cmd = new SqlCommand(strSql, conn);

                SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
                DataSet        thisDataSet = new DataSet();
                adpt.Fill(thisDataSet);

                LstEmployee.DataValueField = "READER_ID";
                LstEmployee.DataTextField  = "ReaderNAME";

                LstEmployee.DataSource = thisDataSet.Tables[0];

                LstEmployee.DataBind();
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                }
            }
            catch (Exception ex)
            {
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                }
                UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeManagerHierarchyAdd");
            }
        }
Esempio n. 9
0
        private void FillEmployeeEntity(string empId)
        {
            try
            {
                string strSql = "";

                strSql = "SELECT  epd_empid as ID,replace(convert(char(20),ltrim(EPD_FIRST_NAME )) + epd_empid,' ',' ')   as NAME FROM ENT_employee_personal_dtls emp " +
                         " inner join ENT_EMPLOYEE_OFFICIAL_DTLS eop on emp.EPD_EMPID=eop.EOD_EMPID WHERE emp.EPD_ISDELETED='0' and eop.EOD_ACTIVE='1'  and emp.EPD_EMPID !='" + empId + "' order by ID ";

                if (conn.State == ConnectionState.Closed)
                {
                    conn.Open();
                }
                SqlCommand cmd = new SqlCommand(strSql, conn);

                SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
                DataSet        thisDataSet = new DataSet();
                adpt.Fill(thisDataSet);

                LstEmployee.DataValueField = "ID";
                LstEmployee.DataTextField  = "NAME";

                LstEmployee.DataSource = thisDataSet.Tables[0];

                LstEmployee.DataBind();
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                }
            }
            catch (Exception ex)
            {
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                }
                UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeManagerHierarchyAdd");
            }
        }
        private void FillEmployeeEntity(string empId)
        {
            try
            {
                clsEmployeeHierarchy objHierarchy = new clsEmployeeHierarchy();
                objHierarchy.EmpID = empId;
                DataTable dt = clsEmployeeHierarchyHandler.GetEmployeeManagerDetails("EMP", objHierarchy);

                LstEmployee.DataValueField = "ID";
                LstEmployee.DataTextField  = "NAME";
                LstEmployee.DataSource     = dt;
                LstEmployee.DataBind();

                lstEmployDummy.DataValueField = "ID";
                lstEmployDummy.DataTextField  = "NAME";
                lstEmployDummy.DataSource     = dt;
                lstEmployDummy.DataBind();
            }
            catch (Exception ex)
            {
                UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EmployeeManagerHierarchyAdd");
            }
        }
Esempio n. 11
0
    public void FillEmployee()
    {
        //  var idd = int.Parse( Request.QueryString["IncomingId"]);

        var    isSeen = (from m in km.UsersGeneralizations select m.isSeen).FirstOrDefault();
        string IsSeenn;

        if (isSeen == false)
        {
            IsSeenn = "لا";
        }

        else
        {
            IsSeenn = "نعم";
        }


        int IncomingId = int.Parse(Request.QueryString["IncomingId"].ToString());
        var emp        = (from k in km.UsersGeneralizations
                          where k.IncomingId == IncomingId
                          select new
        {
            IsSeenn,
            EmployeeName = (from m in km.Employees where m.IdentityNumber == k.UserId select m.Name).FirstOrDefault()
        }).ToList();

        LstEmployee.DataSource = emp;
        LstEmployee.DataBind();

        var IncomingInfo = (from m in km.Incomings where m.Id == IncomingId select m).FirstOrDefault();

        lbldate.Text    = MyDate.getDate(IncomingInfo.Date.ToString());
        lblSource.Text  = ConstantManager.getConstant((int)IncomingInfo.Source);
        lblsubject.Text = IncomingInfo.Subject;
        lbltype.Text    = ConstantManager.getConstant((int)IncomingInfo.Type);
    }
Esempio n. 12
0
        private void fillEntities()
        {
            string        mgrId = Session["uid"].ToString();
            SqlConnection con   = new SqlConnection(m_connections);

            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            SqlCommand cmd = new SqlCommand("USP_GET_EMPDETAILS_ROLEWISE", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@EmployeeCode", mgrId);


            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }
            LstEmployee.DataValueField = "EOD_EMPID";
            LstEmployee.DataTextField  = "EmployeeName";
            LstEmployee.DataSource     = thisDataSet.Tables[0];
            LstEmployee.DataBind();

            lstEmployDummy.DataValueField = "EOD_EMPID";
            lstEmployDummy.DataTextField  = "EmployeeName";
            lstEmployDummy.DataSource     = thisDataSet.Tables[0];
            lstEmployDummy.DataBind();


            /*
             *
             * DataTable dtCompany = thisDataSet.Tables[4].DefaultView.ToTable(true, "CompanyID", "COMPANY_NAME");
             *
             * LstCompany.DataValueField = "CompanyID";
             * LstCompany.DataTextField = "COMPANY_NAME";
             *
             * LstCompany.DataSource = dtCompany;
             *
             * LstCompany.DataBind();
             *
             * DataTable dtCategory = thisDataSet.Tables[5].DefaultView.ToTable(true, "CategoryID", "Category_NAME");
             *
             * LstCategory.DataValueField = "CategoryID";
             * LstCategory.DataTextField = "Category_NAME";
             *
             * LstCategory.DataSource = dtCategory;
             *
             * LstCategory.DataBind();
             *
             *
             * DataTable dtDepartment = thisDataSet.Tables[2].DefaultView.ToTable(true, "DepartmentID", "Department_NAME");
             *
             * LstDepartment.DataValueField = "DepartmentID";
             * LstDepartment.DataTextField = "Department_NAME";
             *
             * LstDepartment.DataSource = dtDepartment;
             *
             * LstDepartment.DataBind();
             *
             *
             * DataTable dtDivision = thisDataSet.Tables[3].DefaultView.ToTable(true, "DivisionID", "Division_NAME");
             *
             * LstDivision.DataValueField = "DivisionID";
             * LstDivision.DataTextField = "Division_NAME";
             *
             * LstDivision.DataSource = dtDivision;
             *
             * LstDivision.DataBind();
             *
             *
             * DataTable dtLocation = thisDataSet.Tables[1].DefaultView.ToTable(true, "LocationID", "Location_NAME");
             *
             * LstLocation.DataValueField = "LocationID";
             * LstLocation.DataTextField = "Location_NAME";
             *
             * LstLocation.DataSource = dtLocation;
             *
             * LstLocation.DataBind();*/
        }