Exemplo n.º 1
0
        public void CommitteeEvaluvationInsert()
        {
            try
            {
                DataSet Ds = new DataSet();
                try
                {
                    int    i      = 0;
                    int    j      = 0;
                    string array1 = MailIdIMPTextBox.Text.ToString();
                    //string array = EmpDepTextBox.Text.ToString();
                    string ds = EmpIDIMPTextBox.Text.ToString();

                    string[] breakMysentence  = ds.Split(',');
                    string[] breakMysentence1 = array1.Split(',');
                    string[] ena1             = new string[breakMysentence.Length];
                    string[] mail1            = new string[breakMysentence.Length];
                    foreach (string data in breakMysentence)
                    {
                        ena1[i] = data;

                        i = i + 1;
                    }

                    foreach (string data1 in breakMysentence1)
                    {
                        mail1[j] = data1;
                        j        = j + 1;
                    }
                    DepIdAutoGeneretion();
                    for (int x = 0; x < ena1.Length; x++)
                    {
                        ComEvalInboxIDAutoGeneration();


                        DBM.SendId        = SendID.ToString();
                        DBM.IdeaId        = IMPIdeaIdTextBox.Text.ToString();
                        DBM.HEmployeeName = us1.ToString();
                        DBM.TempMail      = array1.ToString();
                        DBM.TempId        = ds.ToString();
                        DBM.Date          = System.DateTime.Now.ToString("yyyy-MM-dd").ToString().Trim();
                        DBM.HEmployeeID   = ena1[x].ToString().TrimStart().TrimEnd();
                        DBM.Email         = mail1[x].ToString().TrimStart().TrimEnd();
                        DBM.Subject       = SubjectIMPTextBox.Text.TrimStart().TrimEnd().ToString();
                        DBM.Discription   = ContectIMPTextBox.Text.TrimStart().TrimEnd().ToString();
                        DBM.Remark1       = "i";
                        DBM.Remark2       = "Manager";


                        DBM.ComInboxID = ComEvalInboxID.ToString();
                        DBM.DBMEmail   = Session["Email"].ToString();
                        DBM.ManagerInboxInsert(DBM);
                    }
                    DBM.CommitteeEvaInsert(DBM);
                    string myscript = "alert ('Mail Send Manager');";
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", myscript, true);
                    z = 1;

                    //E.EmployeeInsert(E);
                    //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('New Employee Record Is Added')", true);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message);
                }
            }
            catch (Exception e1)
            {
            }
        }