protected virtual int ExecuteAction(VSM.Data.Objects.Personnel thePersonnel, VSM.Data.Objects.Personnel original_Personnel, string lastCommandName, string commandName, string dataView) { ActionArgs args = new ActionArgs(); args.Controller = "Personnel"; args.View = dataView; args.Values = CreateFieldValues(thePersonnel, original_Personnel); args.LastCommandName = lastCommandName; args.CommandName = commandName; ActionResult result = ControllerFactory.CreateDataController().Execute("Personnel", dataView, args); result.RaiseExceptionIfErrors(); result.AssignTo(thePersonnel); return(result.RowsAffected); }
protected virtual FieldValue[] CreateFieldValues(VSM.Data.Objects.Personnel thePersonnel, VSM.Data.Objects.Personnel original_Personnel) { List <FieldValue> values = new List <FieldValue>(); values.Add(new FieldValue("Personnel_id", original_Personnel.Personnel_id, thePersonnel.Personnel_id)); values.Add(new FieldValue("Personnel_no", original_Personnel.Personnel_no, thePersonnel.Personnel_no)); values.Add(new FieldValue("Personnel_rfid_no", original_Personnel.Personnel_rfid_no, thePersonnel.Personnel_rfid_no)); values.Add(new FieldValue("Personnel_prefix", original_Personnel.Personnel_prefix, thePersonnel.Personnel_prefix)); values.Add(new FieldValue("Personnel_card_no", original_Personnel.Personnel_card_no, thePersonnel.Personnel_card_no)); values.Add(new FieldValue("Personnel_firstname", original_Personnel.Personnel_firstname, thePersonnel.Personnel_firstname)); values.Add(new FieldValue("Personnel_lastname", original_Personnel.Personnel_lastname, thePersonnel.Personnel_lastname)); values.Add(new FieldValue("Personnel_status", original_Personnel.Personnel_status, thePersonnel.Personnel_status)); values.Add(new FieldValue("Personnel_type", original_Personnel.Personnel_type, thePersonnel.Personnel_type)); values.Add(new FieldValue("Personnel_description", original_Personnel.Personnel_description, thePersonnel.Personnel_description)); values.Add(new FieldValue("create_by", original_Personnel.create_by, thePersonnel.create_by)); values.Add(new FieldValue("create_on", original_Personnel.create_on, thePersonnel.create_on)); values.Add(new FieldValue("modified_by", original_Personnel.modified_by, thePersonnel.modified_by)); values.Add(new FieldValue("modified_on", original_Personnel.modified_on, thePersonnel.modified_on)); return(values.ToArray()); }
public virtual int Delete(VSM.Data.Objects.Personnel thePersonnel) { return(ExecuteAction(thePersonnel, thePersonnel, "Select", "Delete", DeleteView)); }
public virtual int Insert(VSM.Data.Objects.Personnel thePersonnel) { return(ExecuteAction(thePersonnel, new Personnel(), "New", "Insert", InsertView)); }
public virtual int Update(VSM.Data.Objects.Personnel thePersonnel) { return(Update(thePersonnel, SelectSingle(thePersonnel.Personnel_id))); }
public virtual int Update(VSM.Data.Objects.Personnel thePersonnel, VSM.Data.Objects.Personnel original_Personnel) { return(ExecuteAction(thePersonnel, original_Personnel, "Edit", "Update", UpdateView)); }
public List <VSM.Data.Objects.Personnel> Select(VSM.Data.Objects.Personnel qbe) { return(Select(qbe.Personnel_id, qbe.Personnel_no, qbe.Personnel_rfid_no, qbe.Personnel_prefix, qbe.Personnel_card_no, qbe.Personnel_firstname, qbe.Personnel_lastname, qbe.Personnel_status, qbe.Personnel_type, qbe.create_by, qbe.create_on, qbe.modified_by, qbe.modified_on)); }
public static List <VSM.Data.Objects.Personnel> Select(VSM.Data.Objects.Personnel qbe) { return(new PersonnelFactory().Select(qbe)); }