public static GraphItems getReport()
        {
            AddSuggestion      A   = new AddSuggestion();
            NewSuggestionModel NSM = new NewSuggestionModel();
            Employee           E   = new Employee();


            GraphItems gra = new GraphItems();

            try
            {
                Mailling m  = new Mailling();
                DataSet  Ds = new DataSet();
                Ds      = m.Barchart_get_details();
                gra.Com = int.Parse(Ds.Tables[0].Rows[0].ItemArray[0].ToString());
                gra.Hod = int.Parse(Ds.Tables[0].Rows[0].ItemArray[1].ToString());
                gra.Imp = int.Parse(Ds.Tables[0].Rows[0].ItemArray[2].ToString());
                gra.Hos = int.Parse(Ds.Tables[0].Rows[0].ItemArray[3].ToString());
                gra.Ben = int.Parse(Ds.Tables[0].Rows[0].ItemArray[4].ToString());
                gra.Fin = int.Parse(Ds.Tables[0].Rows[0].ItemArray[5].ToString());

                return(gra);
            }
            catch (Exception ex)
            {
                return(gra);
            }
        }
        public void headerValues(string userid)
        {
            AddSuggestion      A   = new AddSuggestion();
            NewSuggestionModel NSM = new NewSuggestionModel();
            Employee           E   = new Employee();
            NSDataPasser       tdp = new NSDataPasser();

            //Console.Write(emp);
            //Console.Write("My first ASP script!");

            try
            {
                if (userid != "" && userid != null)
                {
                    NSM.IEmpId = userid;//tdp.sesid.ToString();

                    DataSet DS = new DataSet();
                    DS = NSM.search(NSM);



                    /* tdp.empname = DS.Tables[0].Rows[0].ItemArray[0].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();
                     */
                    EmployeeIdTextBox.Text = userid;
                    tdp.ErrorLabel         = "0";
                    EmployeeTextBox.Text   = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                    SIDepID = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                    DepartmentTextBox.Text = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                    SIDesID = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                    DesignationTextBox.Text = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                }

                else if (userid == "")
                {
                    tdp.ErrorLabel = "Check the Employee ID ";
                }
                else
                {
                    tdp.ErrorLabel = "1";
                }
            }
            catch (Exception ex)
            {
                tdp.ErrorLabel = "alert ('The Employee Record Does Not Exist')";
                ScriptManager.RegisterClientScriptBlock(A, A.GetType(), "alertMessage", "alert('The Employee Record Does Not Exist')", true);
            }
        }
        public static NSDataPasser Checking(string emp)
        {
            AddSuggestion      A   = new AddSuggestion();
            NewSuggestionModel NSM = new NewSuggestionModel();
            Employee           E   = new Employee();
            NSDataPasser       tdp = new NSDataPasser();

            //Console.Write(emp);
            //Console.Write("My first ASP script!");

            try
            {
                if (emp != "" && emp != "System.Data.DataRowView")
                {
                    Console.Write(emp);

                    NSM.IEmpId = tdp.sesid.ToString();

                    DataSet DS = new DataSet();
                    DS = NSM.search(NSM);



                    tdp.empname     = DS.Tables[0].Rows[0].ItemArray[0].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();

                    tdp.ErrorLabel = "0";
                }

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


                return(tdp);
            }
            catch (Exception ex)
            {
                tdp.ErrorLabel = "alert ('The Employee Record Does Not Exist')";
                ScriptManager.RegisterClientScriptBlock(A, A.GetType(), "alertMessage", "alert('The Employee Record Does Not Exist')", true);
                return(tdp);
            }
        }
示例#4
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);
            }
        }
示例#5
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);
            }
        }
        public static NewSuggestionModel CheckingIdeaID(string ideaid)
        {
            NewSuggestionModel NSM = new NewSuggestionModel();



            try
            {
                if (ideaid != "" && ideaid != "System.Data.DataRowView")
                {
                    Console.Write(ideaid);

                    NSM.IdeaId = ideaid;//EmployeeIdTextBox.Text;

                    DataSet DS = new DataSet();
                    DS = NSM.checkIDeaid(NSM);



                    NSM.Status  = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                    NSM.Subject = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                }

                else if (ideaid == "")
                {
                    NSM.Status = "Check the ID ";
                }
                else
                {
                    NSM.Status = "1";
                }


                return(NSM);
            }
            catch (Exception ex)
            {
                //tdp.ErrorLabel = "alert ('The Employee Record Does Not Exist')";
                //ScriptManager.RegisterClientScriptBlock(A, A.GetType(), "alertMessage", "alert('The Employee Record Does Not Exist')", true);
                return(NSM);
            }
        }