Esempio n. 1
0
        public static CEmpEmailContents CheckingUpdate(string emp)
        {
            NewSuggestionModel NSM = new NewSuggestionModel();
            Employee           E   = new Employee();
            CEmpEmailContents  tdp = new CEmpEmailContents();
            DataBankManager    DBM = new DataBankManager();

            //Console.Write(emp);
            //Console.Write("My first ASP script!");
            try
            {
                try
                {
                    if (emp != "" && emp != "System.Data.DataRowView")
                    {
                        Console.Write(emp);

                        DBM.IdeaId = emp.ToString().Trim();

                        DataSet DS = new DataSet();
                        DS = DBM.ComEvalUpdateDashboardProcess(DBM);

                        tdp.Type   = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                        tdp.Reason = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        //SIDepID = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        tdp.Response = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                        tdp.Sempid   = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                        tdp.Sempname = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                        //SIDesID = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                    }

                    else
                    {
                    }
                    return(tdp);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
        public static CESEmpEmailContentsfin MChecking(string emp)
        {
            DataBankManager        DBM = new DataBankManager();
            CESEmpEmailContentsfin EEC = new CESEmpEmailContentsfin();
            DataSet DS = new DataSet();
            Manager M  = new Manager();

            try
            {
                try
                {
                    if (emp != "" && emp != "System.Data.DataRowView")
                    {
                        M.IdeaId = emp.ToString();

                        DS = M.EmployeeNameSelect(M);
                        EEC.HEmployeeID   = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                        EEC.HEmployeeName = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        EEC.Email         = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                        EEC.Amount        = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                        EEC.ErrorLabel    = "0";
                    }

                    else if (emp == "")
                    {
                        EEC.ErrorLabel = "Check the Employee ID ";
                    }

                    else
                    {
                        string err = "Check the Input Record is not Exit ";
                    }
                }
                catch (Exception ex)
                {
                    string err = "Check the Input Record is not Exit ";
                }
                return(EEC);
            }

            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
Esempio n. 3
0
        public static CEmpEmailContentsben Checking(string emp)
        {
            NewSuggestionModel   NSM = new NewSuggestionModel();
            Employee             E   = new Employee();
            CEmpEmailContentsben tdp = new CEmpEmailContentsben();
            DataBankManager      DBM = new DataBankManager();

            //Console.Write(emp);
            //Console.Write("My first ASP script!");
            try
            {
                try
                {
                    if (emp != "" && emp != "System.Data.DataRowView")
                    {
                        Console.Write(emp);

                        DBM.IEmpId = emp.ToString().Trim();

                        DataSet DS = new DataSet();
                        DS = DBM.EmpIDSearch(DBM);

                        tdp.empid   = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                        tdp.empname = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        //SIDepID = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        tdp.Department = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                        //SIDesID = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                        tdp.Designation = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                    }

                    else
                    {
                    }
                    return(tdp);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
Esempio n. 4
0
        public static CESEmpEmailContents Checking(string emp)
        {
            CommiteeEvalSend    NM  = new CommiteeEvalSend();
            DataBankManager     M   = new DataBankManager();
            Employee            E   = new Employee();
            CESEmpEmailContents tdp = new CESEmpEmailContents();

            //Console.Write(emp);
            //Console.Write("My first ASP script!");
            try
            {
                try
                {
                    if ((emp != "") && (emp != "System.Data.DataRowView"))
                    {
                        Console.Write(emp);

                        M.IdeaId = emp.ToString().Trim();
                    }

                    else if (emp == "")
                    {
                        tdp.ErrorLabel = "Check the Employee ID ";
                    }
                    else
                    {
                        tdp.ErrorLabel = "1";
                    }
                }
                catch (Exception ex)
                {
                    tdp.ErrorLabel = "1";
                }
                return(tdp);
            }
            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
        public static List <CESEmpDashboardContents> MChecking(string emp)
        {
            List <CESEmpDashboardContents> lst = new List <CESEmpDashboardContents>();
            DataBankManager         DBM        = new DataBankManager();
            CESEmpDashboardContents EEC        = new CESEmpDashboardContents();
            DataSet DS = new DataSet();
            Manager M  = new Manager();

            try
            {
                try
                {
                    if (emp != "" && emp != "System.Data.DataRowView")
                    {
                        M.IEmpName = emp.ToString();

                        DS = M.DeptEmployeeNameSelect(M);
                        DataTable dt = new DataTable();
                        dt = DS.Tables[0];
                        //lst.Add(new CESEmpDashboardContents() { DS.Tables[0]});
                        //List<CESEmpDashboardContents> rows = DS.Tables[0].<CESEmpDashboardContents>().ToList();
                        if (dt.Rows.Count > 0)
                        {
                            //int tot = DS.Tables.Count;
                            for (int i = 0; dt.Rows.Count > i; i++)
                            {
                                CESEmpDashboardContents EEC1 = new CESEmpDashboardContents();
                                //lst.Add(new ListItem
                                //{
                                //    Value = DS.Tables[0].Columns["EmployeeId"].ToString(),
                                //    Text = DS.Tables[0].Columns["EmployeeName"].ToString()
                                //});

                                EEC1.empid   = dt.Rows[i][0].ToString();
                                EEC1.empname = dt.Rows[i][1].ToString();
                                //EEC1.empid = DS.Tables[0].Rows[i][0].ToString();
                                //EEC1.empname = DS.Tables[0].Rows[i][1].ToString();

                                lst.Add(EEC1);
                            }
                        }
                        EEC.ErrorLabel = "0";
                    }

                    else if (emp == "")
                    {
                        EEC.ErrorLabel = "Check the Employee ID ";
                    }

                    else
                    {
                        string err = "Check the Input Record is not Exit ";
                    }
                }
                catch (Exception ex)
                {
                    string err = "Check the Input Record is not Exit ";
                }
                return(lst);
            }

            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
        public static EmpEmailContent Checking(string emp)
        {
            DataBankManager DBM = new DataBankManager();
            EmpEmailContent EEC = new EmpEmailContent();
            DataSet         DS  = new DataSet();
            int             count;
            string          ei;
            string          en;
            string          em;

            try
            {
                try
                {
                    if (emp != "" && emp != "System.Data.DataRowView")
                    {
                        DBM.IDepName = emp.ToString();
                        DS           = DBM.CommitteeEmailDashBoard(DBM); //this works based on departments
                        //   DS=DBM.CommitteeEmailDashBoard_byEmployeeeID(emp); // this works based on employee id
                        count = DS.Tables[0].Rows.Count;
                        if (DS != null || DS.Tables[0].Rows.Count > 0)
                        {
                            if (count == 1)
                            {
                                EEC.HEmployeeID   = DS.Tables[0].Rows[0].ItemArray[5].ToString();
                                EEC.HEmployeeName = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                                EEC.Email         = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                            }
                            else
                            {
                                for (int i = 0; i < count; i++)
                                {
                                    ei = DS.Tables[0].Rows[i].ItemArray[5].ToString();
                                    en = DS.Tables[0].Rows[i].ItemArray[3].ToString();
                                    em = DS.Tables[0].Rows[i].ItemArray[4].ToString();
                                    if (i < count - 1)
                                    {
                                        EEC.HEmployeeID   = EEC.HEmployeeID + ei + ", ";
                                        EEC.HEmployeeName = EEC.HEmployeeName + en + ", ";
                                        EEC.Email         = EEC.Email + em + ", ";
                                    }
                                    else
                                    {
                                        EEC.HEmployeeID   = EEC.HEmployeeID + ei;
                                        EEC.HEmployeeName = EEC.HEmployeeName + en;
                                        EEC.Email         = EEC.Email + em;
                                    }
                                }
                            }
                            EEC.ErrorLabel = "0";
                        }
                        else if (emp == "")
                        {
                            EEC.ErrorLabel = "Check the Employee ID ";
                        }
                        else
                        {
                            EEC.ErrorLabel = "1";
                        }
                    }
                    else
                    {
                        string err = "Check the Input Record is not Exit ";
                    }
                }
                catch (Exception ex)
                {
                    string err = "Check the Input Record is not Exit ";
                }
                return(EEC);
            }

            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
        public static CMtestDataPassers CMChecking(string cmid)
        {
            ManagerMaster     M   = new ManagerMaster();
            DataBankManager   DBM = new DataBankManager();
            Employee          E   = new Employee();
            CMtestDataPassers tdp = new CMtestDataPassers();

            //Console.Write(emp);
            //Console.Write("My first ASP script!");
            try
            {
                try
                {
                    if ((cmid != "") && (cmid != "System.Data.DataRowView"))
                    {
                        CMID = cmid.ToString().Trim();
                        Console.Write(cmid);

                        DBM.CMID = cmid.ToString().Trim();

                        DataSet DS = new DataSet();
                        DS = DBM.CommitteeIDsearch(DBM);

                        tdp.empid   = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        tdp.empname = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        //SIDepID = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                        tdp.Department = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                        //SIDesID = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                        tdp.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString();

                        tdp.DupCheck = DS.Tables[0].Rows[0].ItemArray[5].ToString();
                        if (tdp.DupCheck != "Other")
                        {
                            tdp.Memberof = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                        }
                        else
                        {
                            tdp.Memberof = DS.Tables[0].Rows[0].ItemArray[5].ToString();
                            tdp.Other    = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                        }

                        tdp.ErrorLabel = "0";
                    }

                    else if (cmid == "")
                    {
                        tdp.ErrorLabel = "Check the Committee ID ";
                    }
                    else
                    {
                        tdp.ErrorLabel = "1";
                    }
                }
                catch (Exception ex)
                {
                    tdp.ErrorLabel = "1";
                }
                return(tdp);
            }
            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }