示例#1
0
 public TbCalisan GetEmployeeData(int id)
 {
     try
     {
         TbCalisan cs = db.TbCalisan.Find(id);
         return(cs);
     }
     catch
     {
         throw;
     }
 }
示例#2
0
 public int AddEmployee(TbCalisan calisan)
 {
     try
     {
         db.TbCalisan.Add(calisan);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
示例#3
0
 public int DeleteEmployee(int id)
 {
     try
     {
         TbCalisan cs = db.TbCalisan.Find(id);
         db.TbCalisan.Remove(cs);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
示例#4
0
        public int UpdateEmployee(TbCalisan calisan)
        {
            try
            {
                db.Entry(calisan).State = EntityState.Modified;
                db.SaveChanges();

                return(1);
            }
            catch
            {
                throw;
            }
        }