public void Edit(int Id) { Model.PracticeStaff staffInfo = _repository.GetStaff(Id); _view.StaffName = staffInfo.StaffName; _view.Specialization = staffInfo.Specialization; _view.Status = staffInfo.Status; _view.Specialization = staffInfo.Specialization; _view.ApplyLeave = staffInfo.ApplyLeave; _view.LeaveFrom = staffInfo.LeaveFrom; _view.LeaveTo = staffInfo.LeaveTo; }
public int Save() { Model.PracticeStaff staff = new Model.PracticeStaff { StaffId = _view.StaffId, StaffName = _view.StaffName, Specialization = _view.Specialization, LeaveFrom = Convert.ToDateTime(_view.LeaveFrom), LeaveTo = Convert.ToDateTime(_view.LeaveTo), ApplyLeave = _view.ApplyLeave }; int isDataSaved = _repository.SaveStaff(_view.StaffId, staff); UpdateListView(); return(isDataSaved); }