예제 #1
0
        protected virtual int ExecuteAction(VSM.Data.Objects.EmployeeEdit theEmployeeEdit, VSM.Data.Objects.EmployeeEdit original_EmployeeEdit, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "EmployeeEdit";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theEmployeeEdit, original_EmployeeEdit);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("EmployeeEdit", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theEmployeeEdit);
            return(result.RowsAffected);
        }
예제 #2
0
        protected virtual FieldValue[] CreateFieldValues(VSM.Data.Objects.EmployeeEdit theEmployeeEdit, VSM.Data.Objects.EmployeeEdit original_EmployeeEdit)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("emp_id", original_EmployeeEdit.emp_id, theEmployeeEdit.emp_id));
            values.Add(new FieldValue("emp_code", original_EmployeeEdit.emp_code, theEmployeeEdit.emp_code, true));
            values.Add(new FieldValue("password", original_EmployeeEdit.password, theEmployeeEdit.password));
            values.Add(new FieldValue("emp_fname", original_EmployeeEdit.emp_fname, theEmployeeEdit.emp_fname));
            values.Add(new FieldValue("emp_lname", original_EmployeeEdit.emp_lname, theEmployeeEdit.emp_lname));
            values.Add(new FieldValue("emp_email", original_EmployeeEdit.emp_email, theEmployeeEdit.emp_email));
            values.Add(new FieldValue("team_id", original_EmployeeEdit.team_id, theEmployeeEdit.team_id));
            values.Add(new FieldValue("telephone", original_EmployeeEdit.telephone, theEmployeeEdit.telephone));
            values.Add(new FieldValue("KioskOwner_ID", original_EmployeeEdit.KioskOwner_ID, theEmployeeEdit.KioskOwner_ID));
            values.Add(new FieldValue("KioskOwner_KioskOwner_Code", original_EmployeeEdit.KioskOwner_KioskOwner_Code, theEmployeeEdit.KioskOwner_KioskOwner_Code, true));
            values.Add(new FieldValue("KioskOwner_Branch_ID", original_EmployeeEdit.KioskOwner_Branch_ID, theEmployeeEdit.KioskOwner_Branch_ID));
            values.Add(new FieldValue("KioskOwner_Branch_KioskOwner_Branch_Code", original_EmployeeEdit.KioskOwner_Branch_KioskOwner_Branch_Code, theEmployeeEdit.KioskOwner_Branch_KioskOwner_Branch_Code, true));
            values.Add(new FieldValue("CreatedBy", original_EmployeeEdit.CreatedBy, theEmployeeEdit.CreatedBy));
            values.Add(new FieldValue("CreatedOn", original_EmployeeEdit.CreatedOn, theEmployeeEdit.CreatedOn));
            values.Add(new FieldValue("ModifiedBy", original_EmployeeEdit.ModifiedBy, theEmployeeEdit.ModifiedBy));
            values.Add(new FieldValue("ModifiedOn", original_EmployeeEdit.ModifiedOn, theEmployeeEdit.ModifiedOn));
            values.Add(new FieldValue("createname", original_EmployeeEdit.createname, theEmployeeEdit.createname));
            values.Add(new FieldValue("updatename", original_EmployeeEdit.updatename, theEmployeeEdit.updatename));
            return(values.ToArray());
        }
예제 #3
0
 public virtual int Delete(VSM.Data.Objects.EmployeeEdit theEmployeeEdit)
 {
     return(ExecuteAction(theEmployeeEdit, theEmployeeEdit, "Select", "Delete", DeleteView));
 }
예제 #4
0
 public virtual int Insert(VSM.Data.Objects.EmployeeEdit theEmployeeEdit)
 {
     return(ExecuteAction(theEmployeeEdit, new EmployeeEdit(), "New", "Insert", InsertView));
 }
예제 #5
0
 public virtual int Update(VSM.Data.Objects.EmployeeEdit theEmployeeEdit)
 {
     return(Update(theEmployeeEdit, SelectSingle(theEmployeeEdit.emp_id)));
 }
예제 #6
0
 public virtual int Update(VSM.Data.Objects.EmployeeEdit theEmployeeEdit, VSM.Data.Objects.EmployeeEdit original_EmployeeEdit)
 {
     return(ExecuteAction(theEmployeeEdit, original_EmployeeEdit, "Edit", "Update", UpdateView));
 }
예제 #7
0
 public List <VSM.Data.Objects.EmployeeEdit> Select(VSM.Data.Objects.EmployeeEdit qbe)
 {
     return(Select(qbe.emp_id, qbe.emp_code, qbe.password, qbe.emp_fname, qbe.emp_lname, qbe.emp_email, qbe.team_id, qbe.telephone, qbe.KioskOwner_ID, qbe.KioskOwner_KioskOwner_Code, qbe.KioskOwner_Branch_ID, qbe.KioskOwner_Branch_KioskOwner_Branch_Code, qbe.CreatedBy, qbe.CreatedOn, qbe.ModifiedBy, qbe.ModifiedOn));
 }
예제 #8
0
 public static List <VSM.Data.Objects.EmployeeEdit> Select(VSM.Data.Objects.EmployeeEdit qbe)
 {
     return(new EmployeeEditFactory().Select(qbe));
 }