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