Ejemplo n.º 1
0
        public void DeleteDesignation(Guid DesignationId)
        {
            bt_Designation model = gWork.Repository <bt_Designation>().AsQuerable().FirstOrDefault(x => x.DesignationId == DesignationId);

            gWork.Repository <bt_Designation>().Attach(model);
            model.IsDeleted = true;
            gWork.SaveChanges();
        }
Ejemplo n.º 2
0
        public void UpdateDesignation(DesignationModel model)
        {
            bt_Designation desg = gWork.Repository <bt_Designation>().AsQuerable().FirstOrDefault(x => x.DesignationId == model.DesignationId);

            gWork.Repository <bt_Designation>().Attach(desg);
            desg.DesignationId = model.DesignationId;
            desg.Name          = model.Name;
            desg.Code          = model.Code;
            desg.IsDeleted     = model.IsDeleted;
            gWork.SaveChanges();
        }
Ejemplo n.º 3
0
        public void AddDesignation(DesignationModel model)
        {
            bt_Designation designation = new bt_Designation();

            designation.DesignationId   = model.DesignationId;
            designation.Name            = model.Name;
            designation.Code            = model.Code;
            designation.CreatedBy       = model.CreatedBy;
            designation.CreatedDateTime = model.CreatedDateTime;
            gWork.Repository <bt_Designation>().Add(designation);
            gWork.SaveChanges();
        }