Ejemplo n.º 1
0
        public static CESEmpEmailContents Checking(string IdeaID)
        {
            CommiteeEvalSend    NM  = new CommiteeEvalSend();
            Mailling            M   = new Mailling();
            Employee            E   = new Employee();
            CESEmpEmailContents EEC = new CESEmpEmailContents();
            string            chk;
            RegistrationLogin RL = new RegistrationLogin();

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

                        M.IdeaId = IdeaID.ToString().Trim();

                        DataSet DS = new DataSet();
                        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();

                            RL.HEmployeeID = EEC.REmpID;
                            DS             = RL.LoginSearch(RL);
                            EEC.REmpName   = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        }
                    }
                    else if (IdeaID == "")
                    {
                        EEC.ErrorLabel = "Check the Employee ID ";
                    }
                    else
                    {
                        EEC.ErrorLabel = "1";
                    }
                }
                catch (Exception ex)
                {
                    EEC.ErrorLabel = "1";
                }
                return(EEC);
            }
            catch (Exception ex)
            {
                throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
            }
        }
        public static CESEmpEmailContentsfin GetFinanceDetails(string emp)
        {
            CommiteeEvalSend NM = new CommiteeEvalSend();

            Manager MM = new Manager();
            CESEmpEmailContentsfin EEC = new CESEmpEmailContentsfin();

            RegistrationLogin RL = new RegistrationLogin();

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

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

                        DataSet DS = new DataSet();
                        DS = MM.PaymentDetails(MM);

                        EEC.RIdeaID  = DS.Tables[0].Rows[0].ItemArray[0].ToString();
                        EEC.Date     = DS.Tables[0].Rows[0].ItemArray[1].ToString();
                        EEC.REmpID   = DS.Tables[0].Rows[0].ItemArray[2].ToString();
                        EEC.REmpName = DS.Tables[0].Rows[0].ItemArray[3].ToString();
                        EEC.Finname  = DS.Tables[0].Rows[0].ItemArray[4].ToString();
                        EEC.Amount   = DS.Tables[0].Rows[0].ItemArray[5].ToString();
                        EEC.CashMode = DS.Tables[0].Rows[0].ItemArray[6].ToString();
                    }


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