Exemplo n.º 1
0
        protected virtual int ExecuteAction(VSM.Data.Objects.Employee theEmployee, VSM.Data.Objects.Employee original_Employee, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "Employee";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theEmployee, original_Employee);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("Employee", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theEmployee);
            return(result.RowsAffected);
        }
Exemplo n.º 2
0
        protected virtual FieldValue[] CreateFieldValues(VSM.Data.Objects.Employee theEmployee, VSM.Data.Objects.Employee original_Employee)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("emp_id", original_Employee.emp_id, theEmployee.emp_id));
            values.Add(new FieldValue("emp_code", original_Employee.emp_code, theEmployee.emp_code));
            values.Add(new FieldValue("password", original_Employee.password, theEmployee.password));
            values.Add(new FieldValue("emp_fname", original_Employee.emp_fname, theEmployee.emp_fname));
            values.Add(new FieldValue("emp_lname", original_Employee.emp_lname, theEmployee.emp_lname));
            values.Add(new FieldValue("emp_email", original_Employee.emp_email, theEmployee.emp_email));
            values.Add(new FieldValue("team_id", original_Employee.team_id, theEmployee.team_id));
            values.Add(new FieldValue("telephone", original_Employee.telephone, theEmployee.telephone));
            values.Add(new FieldValue("KioskOwner_ID", original_Employee.KioskOwner_ID, theEmployee.KioskOwner_ID));
            values.Add(new FieldValue("KioskOwner_Code", original_Employee.KioskOwner_Code, theEmployee.KioskOwner_Code, true));
            values.Add(new FieldValue("KioskOwner_Branch_ID", original_Employee.KioskOwner_Branch_ID, theEmployee.KioskOwner_Branch_ID));
            values.Add(new FieldValue("KioskOwner_Branch_Code", original_Employee.KioskOwner_Branch_Code, theEmployee.KioskOwner_Branch_Code, true));
            values.Add(new FieldValue("CreatedBy", original_Employee.CreatedBy, theEmployee.CreatedBy));
            values.Add(new FieldValue("CreatedOn", original_Employee.CreatedOn, theEmployee.CreatedOn));
            values.Add(new FieldValue("ModifiedBy", original_Employee.ModifiedBy, theEmployee.ModifiedBy));
            values.Add(new FieldValue("ModifiedOn", original_Employee.ModifiedOn, theEmployee.ModifiedOn));
            values.Add(new FieldValue("createname", original_Employee.createname, theEmployee.createname));
            values.Add(new FieldValue("updatename", original_Employee.updatename, theEmployee.updatename));
            return(values.ToArray());
        }
Exemplo n.º 3
0
 public virtual int Delete(VSM.Data.Objects.Employee theEmployee)
 {
     return(ExecuteAction(theEmployee, theEmployee, "Select", "Delete", DeleteView));
 }
Exemplo n.º 4
0
 public virtual int Insert(VSM.Data.Objects.Employee theEmployee)
 {
     return(ExecuteAction(theEmployee, new Employee(), "New", "Insert", InsertView));
 }
Exemplo n.º 5
0
 public virtual int Update(VSM.Data.Objects.Employee theEmployee)
 {
     return(Update(theEmployee, SelectSingle(theEmployee.emp_id)));
 }
Exemplo n.º 6
0
 public virtual int Update(VSM.Data.Objects.Employee theEmployee, VSM.Data.Objects.Employee original_Employee)
 {
     return(ExecuteAction(theEmployee, original_Employee, "Edit", "Update", UpdateView));
 }
Exemplo n.º 7
0
 public List <VSM.Data.Objects.Employee> Select(VSM.Data.Objects.Employee 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_Code, qbe.KioskOwner_Branch_ID, qbe.KioskOwner_Branch_Code, qbe.CreatedBy, qbe.CreatedOn, qbe.ModifiedBy, qbe.ModifiedOn));
 }
Exemplo n.º 8
0
 public static List <VSM.Data.Objects.Employee> Select(VSM.Data.Objects.Employee qbe)
 {
     return(new EmployeeFactory().Select(qbe));
 }