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