示例#1
0
 //To Add new employee record
 public void AddEmployee(Employee employee)
 {
     try
     {
         db.Employee.Add(employee);
         db.SaveChanges();
     }
     catch
     {
         throw;
     }
 }
示例#2
0
        //To Add new employee record

        public int AddEmployee(TblEmployee employee)
        {
            try
            {
                db.TblEmployee.Add(employee);
                db.SaveChanges();
                return(1);
            }
            catch
            {
                throw;
            }
        }
 //To Add NewUser
 public int AddUser(TblUsers userdet)
 {
     try
     {
         db.TblUsers.Add(userdet);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
示例#4
0
 public int AddPolicy(Policy policy)
 {
     try
     {
         db.Policy.Add(policy);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
示例#5
0
        public int AddEvent(TblEvents events)
        {
            try
            {
                string cute_String;
                string MyString = events.Photo;
                cute_String  = MyString.Remove(0, 12);
                events.Photo = cute_String;
                db.TblEvent.Add(events);

                db.SaveChanges();
                return(1);
            }
            catch
            {
                throw;
            }
        }