Exemplo n.º 1
0
        static void sendMails(int ID)
        {
            MailMessage mail       = new MailMessage();
            SmtpClient  SmtpServer = new SmtpClient("smtp.gmail.com");

            mail.From = new MailAddress("*****@*****.**");
            mail.To.Add(DAT.forMailSend(ID).ToString());
            mail.Subject = "Test Mail SMTP";
            mail.Body    = "This is a system message. You have been notified for a work order, please log-in and check your PRIMS Account.";


            SmtpServer.Port        = 587;
            SmtpServer.Credentials = new System.Net.NetworkCredential("*****@*****.**", "passwierd123");
            SmtpServer.EnableSsl   = true;

            SmtpServer.Send(mail);
        }
Exemplo n.º 2
0
        public static Tuple <bool, string[]> chkLogIn(string usern, string passw)
        {
            DataTable dt     = DAT.logIn(int.Parse(usern), passw);
            bool      result = true;

            string[] arr = new string[3];

            if (dt.Rows.Count.Equals(0))
            {
                result = false;
            }
            else
            {
                arr[0] = usern;
                arr[1] = dt.Rows[0][1].ToString();
                arr[2] = dt.Rows[0][2].ToString();
            }
            return(Tuple.Create(result, arr));
        }
Exemplo n.º 3
0
        public static void createProj(string Pr_ID, string pr_Title, string SAP_Ref, string Details, string Client, string Supervisor, string Pr_Lead, string S_Date, string E_Date, DataTable TaskMem, DataTable Task)
        {
            //Pr_ID, Pr_Title, SAP_Ref, Details, Client, Supervisor, Pr_Lead, S_Date, E_Date
            DAT.createProject(Pr_ID, pr_Title, int.Parse(SAP_Ref), Details, int.Parse(Client), int.Parse(Supervisor), int.Parse(Pr_Lead), S_Date, E_Date);

            foreach (DataRow row in Task.Rows)
            {
                DAT.insertTask(int.Parse(row[0].ToString()), Pr_ID, row[1].ToString(),
                               row[2].ToString(), row[3].ToString(), int.Parse(row[4].ToString()));
            }

            foreach (DataRow row in TaskMem.Rows)
            {
                DAT.insertTaskEm(int.Parse(row[2].ToString()), int.Parse(row[0].ToString()));
            }

            //DataView DV = new DataView(TaskMem);
            //DataTable Test = DV.ToTable(true, "Task Assigned ID");

            //foreach (DataRow row in Test.Rows)
            //{
            //    sendMails(int.Parse(row[0].ToString()));
            //}
        }
Exemplo n.º 4
0
 public string getItemDesc(string ItemID)
 {
     return(DAT.getItemDetail(int.Parse(ItemID)));
 }
Exemplo n.º 5
0
 public static void updateThisTask(string ID)
 {
     DAT.updateTask(int.Parse(ID));
 }
Exemplo n.º 6
0
 public DataTable kliyent(string ID)
 {
     return(DAT.kliyente(int.Parse(ID)));
 }
Exemplo n.º 7
0
 public DataTable getMyTask(string ID)
 {
     return(DAT.getMyTasks(int.Parse(ID)));
 }
Exemplo n.º 8
0
 public DataTable getEmp()
 {
     return(DAT.getEmployees());
 }
Exemplo n.º 9
0
 public static void insrtBD(string BOMid, string stockcode)
 {
     DAT.insertBOMDet(stockcode, int.Parse(BOMid));
 }
Exemplo n.º 10
0
 public static string insrtBOM(string pono, string prepBy, string projCode)
 {
     return(DAT.insertBOM(pono, int.Parse(prepBy), projCode));
 }