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