protected virtual int ExecuteAction(MyCompany.Data.Objects.MaterialNumberImportLog theMaterialNumberImportLog, MyCompany.Data.Objects.MaterialNumberImportLog original_MaterialNumberImportLog, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "MaterialNumberImportLog";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theMaterialNumberImportLog, original_MaterialNumberImportLog);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("MaterialNumberImportLog", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theMaterialNumberImportLog);
            return(result.RowsAffected);
        }
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.MaterialNumberImportLog theMaterialNumberImportLog, MyCompany.Data.Objects.MaterialNumberImportLog original_MaterialNumberImportLog)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("LogId", original_MaterialNumberImportLog.LogId, theMaterialNumberImportLog.LogId, true));
            values.Add(new FieldValue("AutoId", original_MaterialNumberImportLog.AutoId, theMaterialNumberImportLog.AutoId));
            values.Add(new FieldValue("SoldtoParty", original_MaterialNumberImportLog.SoldtoParty, theMaterialNumberImportLog.SoldtoParty));
            values.Add(new FieldValue("ShiptoParty", original_MaterialNumberImportLog.ShiptoParty, theMaterialNumberImportLog.ShiptoParty));
            values.Add(new FieldValue("CustomerItemNumber", original_MaterialNumberImportLog.CustomerItemNumber, theMaterialNumberImportLog.CustomerItemNumber));
            values.Add(new FieldValue("MassPartsIDFlag", original_MaterialNumberImportLog.MassPartsIDFlag, theMaterialNumberImportLog.MassPartsIDFlag));
            values.Add(new FieldValue("ExpansionKey1", original_MaterialNumberImportLog.ExpansionKey1, theMaterialNumberImportLog.ExpansionKey1));
            values.Add(new FieldValue("ExpansionKey2", original_MaterialNumberImportLog.ExpansionKey2, theMaterialNumberImportLog.ExpansionKey2));
            values.Add(new FieldValue("ExpansionKey3", original_MaterialNumberImportLog.ExpansionKey3, theMaterialNumberImportLog.ExpansionKey3));
            values.Add(new FieldValue("VaridityDateTo", original_MaterialNumberImportLog.VaridityDateTo, theMaterialNumberImportLog.VaridityDateTo));
            values.Add(new FieldValue("ValiditydateFrom", original_MaterialNumberImportLog.ValiditydateFrom, theMaterialNumberImportLog.ValiditydateFrom));
            values.Add(new FieldValue("PLANT", original_MaterialNumberImportLog.PLANT, theMaterialNumberImportLog.PLANT));
            values.Add(new FieldValue("MaterialNumber", original_MaterialNumberImportLog.MaterialNumber, theMaterialNumberImportLog.MaterialNumber));
            values.Add(new FieldValue("UnitCode", original_MaterialNumberImportLog.UnitCode, theMaterialNumberImportLog.UnitCode));
            values.Add(new FieldValue("Status", original_MaterialNumberImportLog.Status, theMaterialNumberImportLog.Status));
            values.Add(new FieldValue("ExecuteDate", original_MaterialNumberImportLog.ExecuteDate, theMaterialNumberImportLog.ExecuteDate));
            return(values.ToArray());
        }
 public virtual int Delete(MyCompany.Data.Objects.MaterialNumberImportLog theMaterialNumberImportLog)
 {
     return(ExecuteAction(theMaterialNumberImportLog, theMaterialNumberImportLog, "Select", "Delete", DeleteView));
 }
 public virtual int Insert(MyCompany.Data.Objects.MaterialNumberImportLog theMaterialNumberImportLog)
 {
     return(ExecuteAction(theMaterialNumberImportLog, new MaterialNumberImportLog(), "New", "Insert", InsertView));
 }
 public virtual int Update(MyCompany.Data.Objects.MaterialNumberImportLog theMaterialNumberImportLog)
 {
     return(Update(theMaterialNumberImportLog, SelectSingle(theMaterialNumberImportLog.LogId)));
 }
 public virtual int Update(MyCompany.Data.Objects.MaterialNumberImportLog theMaterialNumberImportLog, MyCompany.Data.Objects.MaterialNumberImportLog original_MaterialNumberImportLog)
 {
     return(ExecuteAction(theMaterialNumberImportLog, original_MaterialNumberImportLog, "Edit", "Update", UpdateView));
 }
 public List <MyCompany.Data.Objects.MaterialNumberImportLog> Select(MyCompany.Data.Objects.MaterialNumberImportLog qbe)
 {
     return(Select(qbe.LogId, qbe.AutoId, qbe.SoldtoParty, qbe.ShiptoParty, qbe.CustomerItemNumber, qbe.MassPartsIDFlag, qbe.ExpansionKey1, qbe.ExpansionKey2, qbe.ExpansionKey3, qbe.VaridityDateTo, qbe.ValiditydateFrom, qbe.PLANT, qbe.MaterialNumber, qbe.UnitCode, qbe.Status, qbe.ExecuteDate));
 }
 public static List <MyCompany.Data.Objects.MaterialNumberImportLog> Select(MyCompany.Data.Objects.MaterialNumberImportLog qbe)
 {
     return(new MaterialNumberImportLogFactory().Select(qbe));
 }