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 EmpEmailContent MailContent(string idea)
        {
            EmpEmailContent   EEC = new EmpEmailContent();
            Mailling          M   = new Mailling();
            DataSet           DS  = new DataSet();
            RegistrationLogin RL  = new RegistrationLogin();

            try
            {
                int i = 0;

                //RepeaterItem item = (sender as TextBox).Parent as RepeaterItem;
                //index = int.Parse((item.FindControl("lblImageNameTextBox") as Label).Text);

                M.IdeaId = idea.ToString();

                DS = M.Repeatersearch(M);


                EEC.fromTag   = "From : ";
                EEC.EIDTag    = "Employee ID : ";
                EEC.DepTag    = "Department : ";
                EEC.DesTag    = "Designaton : ";
                EEC.CatTag    = "Category : ";
                EEC.IdIdTag   = "Idea ID: ";
                EEC.BefTag    = "Before : ";
                EEC.AftTag    = "After : ";
                EEC.BenTag    = "Benefits : ";
                EEC.upl1Tag   = "FileUpload1";
                EEC.upl2Tag   = "FileUpload2";
                EEC.upl3Tag   = "FileUpload3";
                EEC.IdeaIdTag = idea.ToString();

                EEC.empname     = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                EEC.empid       = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                EEC.Department  = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                EEC.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                EEC.Date        = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                EEC.category    = DS.Tables[0].Rows[0].ItemArray[5].ToString();
                EEC.subject     = DS.Tables[0].Rows[0].ItemArray[6].ToString();
                EEC.Before      = DS.Tables[0].Rows[0].ItemArray[7].ToString();
                EEC.After       = DS.Tables[0].Rows[0].ItemArray[8].ToString();
                EEC.Benifit     = DS.Tables[0].Rows[0].ItemArray[9].ToString();
                EEC.UpLoad1     = DS.Tables[0].Rows[0].ItemArray[11].ToString();
                // EEC.upload1 = "/PIMS/UI/Image/" + EEC.UpLoad1;
                EEC.upload1 = "../UI/Image/" + EEC.UpLoad1;
                EEC.UpLoad2 = DS.Tables[0].Rows[0].ItemArray[12].ToString();
                //EEC.upload2 = "/PIMS/UI/Image/" + EEC.UpLoad2;
                EEC.upload2 = "../UI/Image/" + EEC.UpLoad2;
                EEC.UpLoad3 = DS.Tables[0].Rows[0].ItemArray[13].ToString();
                // EEC.upload3 = "/PIMS/UI/Image/" + EEC.UpLoad3;
                EEC.upload3 = "../UI/Image/" + EEC.UpLoad3;
                DS          = M.DBMReplyCE(M);
                chk         = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                if (chk != "Empty")
                {
                    EEC.RIdeaID = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                    EEC.REmpID  = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                    EEC.RMail   = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                    EEC.RSub    = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                    EEC.RCon    = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                    string[] breakMysentence = EEC.REmpID.Split(',');
                    string[] ena1            = new string[breakMysentence.Length];
                    string   n = "";
                    foreach (string data in breakMysentence)
                    {
                        ena1[i]        = data;
                        i              = i + 1;
                        RL.HEmployeeID = data.ToString().TrimStart().TrimEnd();
                        DS             = RL.LoginSearch(RL);
                        if (n != "")
                        {
                            n = n + ", " + DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        }
                        else
                        {
                            n = n + DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        }
                    }
                    EEC.REmpName = n;
                }



                return(EEC);
            }
            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }