Ejemplo n.º 1
0
 public void submitComplaint(custComplaint c)
 {
     using (NORBITEntities b = new NORBITEntities())
     {
         c.date = DateTime.Now;
         b.custComplaints.Add(c);
         b.SaveChanges();
     }
 }
Ejemplo n.º 2
0
        public string getComplaintContent(string id)
        {
            int i = Convert.ToInt32(id);

            using (NORBITEntities b = new NORBITEntities())
            {
                var q = from x in b.custComplaints
                        where x.Id == i
                        select x;
                custComplaint c       = q.ToList().ElementAt(0);
                string        message = c.message;
                c.status = 1;
                b.SaveChanges();


                return(message);
            }
        }