예제 #1
0
        protected virtual int ExecuteAction(MyCompany.Data.Objects.THMForcastMonthImport theTHMForcastMonthImport, MyCompany.Data.Objects.THMForcastMonthImport original_THMForcastMonthImport, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "THMForcastMonthImport";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theTHMForcastMonthImport, original_THMForcastMonthImport);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("THMForcastMonthImport", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theTHMForcastMonthImport);
            return(result.RowsAffected);
        }
예제 #2
0
        protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.THMForcastMonthImport theTHMForcastMonthImport, MyCompany.Data.Objects.THMForcastMonthImport original_THMForcastMonthImport)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("AutoId", original_THMForcastMonthImport.AutoId, theTHMForcastMonthImport.AutoId, true));
            values.Add(new FieldValue("OrderBy", original_THMForcastMonthImport.OrderBy, theTHMForcastMonthImport.OrderBy));
            values.Add(new FieldValue("DeliveryDestination", original_THMForcastMonthImport.DeliveryDestination, theTHMForcastMonthImport.DeliveryDestination));
            values.Add(new FieldValue("CustomerMatCode", original_THMForcastMonthImport.CustomerMatCode, theTHMForcastMonthImport.CustomerMatCode));
            values.Add(new FieldValue("PartsDevision", original_THMForcastMonthImport.PartsDevision, theTHMForcastMonthImport.PartsDevision));
            values.Add(new FieldValue("CustomerPO", original_THMForcastMonthImport.CustomerPO, theTHMForcastMonthImport.CustomerPO));
            values.Add(new FieldValue("Key1", original_THMForcastMonthImport.Key1, theTHMForcastMonthImport.Key1));
            values.Add(new FieldValue("Key2", original_THMForcastMonthImport.Key2, theTHMForcastMonthImport.Key2));
            values.Add(new FieldValue("Key3", original_THMForcastMonthImport.Key3, theTHMForcastMonthImport.Key3));
            values.Add(new FieldValue("ReliabilityDevision", original_THMForcastMonthImport.ReliabilityDevision, theTHMForcastMonthImport.ReliabilityDevision));
            values.Add(new FieldValue("DeliveryDate", original_THMForcastMonthImport.DeliveryDate, theTHMForcastMonthImport.DeliveryDate));
            values.Add(new FieldValue("Quantity", original_THMForcastMonthImport.Quantity, theTHMForcastMonthImport.Quantity));
            values.Add(new FieldValue("Unit", original_THMForcastMonthImport.Unit, theTHMForcastMonthImport.Unit));
            values.Add(new FieldValue("PlngPeriod", original_THMForcastMonthImport.PlngPeriod, theTHMForcastMonthImport.PlngPeriod));
            values.Add(new FieldValue("SAPCode", original_THMForcastMonthImport.SAPCode, theTHMForcastMonthImport.SAPCode));
            values.Add(new FieldValue("FileId", original_THMForcastMonthImport.FileId, theTHMForcastMonthImport.FileId));
            values.Add(new FieldValue("StatusCode", original_THMForcastMonthImport.StatusCode, theTHMForcastMonthImport.StatusCode));
            return(values.ToArray());
        }
예제 #3
0
 public virtual int Delete(MyCompany.Data.Objects.THMForcastMonthImport theTHMForcastMonthImport)
 {
     return(ExecuteAction(theTHMForcastMonthImport, theTHMForcastMonthImport, "Select", "Delete", DeleteView));
 }
예제 #4
0
 public virtual int Insert(MyCompany.Data.Objects.THMForcastMonthImport theTHMForcastMonthImport)
 {
     return(ExecuteAction(theTHMForcastMonthImport, new THMForcastMonthImport(), "New", "Insert", InsertView));
 }
예제 #5
0
 public virtual int Update(MyCompany.Data.Objects.THMForcastMonthImport theTHMForcastMonthImport)
 {
     return(Update(theTHMForcastMonthImport, SelectSingle(theTHMForcastMonthImport.AutoId)));
 }
예제 #6
0
 public virtual int Update(MyCompany.Data.Objects.THMForcastMonthImport theTHMForcastMonthImport, MyCompany.Data.Objects.THMForcastMonthImport original_THMForcastMonthImport)
 {
     return(ExecuteAction(theTHMForcastMonthImport, original_THMForcastMonthImport, "Edit", "Update", UpdateView));
 }
예제 #7
0
 public List <MyCompany.Data.Objects.THMForcastMonthImport> Select(MyCompany.Data.Objects.THMForcastMonthImport 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));
 }
예제 #8
0
 public static List <MyCompany.Data.Objects.THMForcastMonthImport> Select(MyCompany.Data.Objects.THMForcastMonthImport qbe)
 {
     return(new THMForcastMonthImportFactory().Select(qbe));
 }