protected virtual int ExecuteAction(MyCompany.Data.Objects.TSMForcastMonthImport theTSMForcastMonthImport, MyCompany.Data.Objects.TSMForcastMonthImport original_TSMForcastMonthImport, string lastCommandName, string commandName, string dataView) { ActionArgs args = new ActionArgs(); args.Controller = "TSMForcastMonthImport"; args.View = dataView; args.Values = CreateFieldValues(theTSMForcastMonthImport, original_TSMForcastMonthImport); args.LastCommandName = lastCommandName; args.CommandName = commandName; ActionResult result = ControllerFactory.CreateDataController().Execute("TSMForcastMonthImport", dataView, args); result.RaiseExceptionIfErrors(); result.AssignTo(theTSMForcastMonthImport); return(result.RowsAffected); }
protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.TSMForcastMonthImport theTSMForcastMonthImport, MyCompany.Data.Objects.TSMForcastMonthImport original_TSMForcastMonthImport) { List <FieldValue> values = new List <FieldValue>(); values.Add(new FieldValue("AutoId", original_TSMForcastMonthImport.AutoId, theTSMForcastMonthImport.AutoId, true)); values.Add(new FieldValue("OrderBy", original_TSMForcastMonthImport.OrderBy, theTSMForcastMonthImport.OrderBy)); values.Add(new FieldValue("DeliveryDestination", original_TSMForcastMonthImport.DeliveryDestination, theTSMForcastMonthImport.DeliveryDestination)); values.Add(new FieldValue("CustomerMatCode", original_TSMForcastMonthImport.CustomerMatCode, theTSMForcastMonthImport.CustomerMatCode)); values.Add(new FieldValue("PartsDevision", original_TSMForcastMonthImport.PartsDevision, theTSMForcastMonthImport.PartsDevision)); values.Add(new FieldValue("CustomerPO", original_TSMForcastMonthImport.CustomerPO, theTSMForcastMonthImport.CustomerPO)); values.Add(new FieldValue("Key1", original_TSMForcastMonthImport.Key1, theTSMForcastMonthImport.Key1)); values.Add(new FieldValue("Key2", original_TSMForcastMonthImport.Key2, theTSMForcastMonthImport.Key2)); values.Add(new FieldValue("Key3", original_TSMForcastMonthImport.Key3, theTSMForcastMonthImport.Key3)); values.Add(new FieldValue("ReliabilityDevision", original_TSMForcastMonthImport.ReliabilityDevision, theTSMForcastMonthImport.ReliabilityDevision)); values.Add(new FieldValue("DeliveryDate", original_TSMForcastMonthImport.DeliveryDate, theTSMForcastMonthImport.DeliveryDate)); values.Add(new FieldValue("Quantity", original_TSMForcastMonthImport.Quantity, theTSMForcastMonthImport.Quantity)); values.Add(new FieldValue("Unit", original_TSMForcastMonthImport.Unit, theTSMForcastMonthImport.Unit)); values.Add(new FieldValue("PlngPeriod", original_TSMForcastMonthImport.PlngPeriod, theTSMForcastMonthImport.PlngPeriod)); values.Add(new FieldValue("SAPCode", original_TSMForcastMonthImport.SAPCode, theTSMForcastMonthImport.SAPCode)); values.Add(new FieldValue("FileId", original_TSMForcastMonthImport.FileId, theTSMForcastMonthImport.FileId)); values.Add(new FieldValue("StatusCode", original_TSMForcastMonthImport.StatusCode, theTSMForcastMonthImport.StatusCode)); return(values.ToArray()); }
public virtual int Delete(MyCompany.Data.Objects.TSMForcastMonthImport theTSMForcastMonthImport) { return(ExecuteAction(theTSMForcastMonthImport, theTSMForcastMonthImport, "Select", "Delete", DeleteView)); }
public virtual int Insert(MyCompany.Data.Objects.TSMForcastMonthImport theTSMForcastMonthImport) { return(ExecuteAction(theTSMForcastMonthImport, new TSMForcastMonthImport(), "New", "Insert", InsertView)); }
public virtual int Update(MyCompany.Data.Objects.TSMForcastMonthImport theTSMForcastMonthImport) { return(Update(theTSMForcastMonthImport, SelectSingle(theTSMForcastMonthImport.AutoId))); }
public virtual int Update(MyCompany.Data.Objects.TSMForcastMonthImport theTSMForcastMonthImport, MyCompany.Data.Objects.TSMForcastMonthImport original_TSMForcastMonthImport) { return(ExecuteAction(theTSMForcastMonthImport, original_TSMForcastMonthImport, "Edit", "Update", UpdateView)); }
public List <MyCompany.Data.Objects.TSMForcastMonthImport> Select(MyCompany.Data.Objects.TSMForcastMonthImport qbe) { return(Select(qbe.AutoId, qbe.OrderBy, qbe.DeliveryDestination, qbe.CustomerMatCode, qbe.PartsDevision, qbe.CustomerPO, qbe.Key1, qbe.Key2, qbe.Key3, qbe.ReliabilityDevision, qbe.DeliveryDate, qbe.Quantity, qbe.Unit, qbe.PlngPeriod, qbe.SAPCode, qbe.FileId, qbe.StatusCode)); }
public static List <MyCompany.Data.Objects.TSMForcastMonthImport> Select(MyCompany.Data.Objects.TSMForcastMonthImport qbe) { return(new TSMForcastMonthImportFactory().Select(qbe)); }