Пример #1
0
        protected virtual FieldValue[] CreateFieldValues(VSM.Data.Objects.M_Country theM_Country, VSM.Data.Objects.M_Country original_M_Country)
        {
            List <FieldValue> values = new List <FieldValue>();

            values.Add(new FieldValue("Country_Code", original_M_Country.Country_Code, theM_Country.Country_Code));
            values.Add(new FieldValue("Country_Name_Locale", original_M_Country.Country_Name_Locale, theM_Country.Country_Name_Locale));
            values.Add(new FieldValue("Country_Name_En", original_M_Country.Country_Name_En, theM_Country.Country_Name_En));
            values.Add(new FieldValue("CreatedBy", original_M_Country.CreatedBy, theM_Country.CreatedBy));
            values.Add(new FieldValue("CreatedOn", original_M_Country.CreatedOn, theM_Country.CreatedOn));
            values.Add(new FieldValue("ModifiedBy", original_M_Country.ModifiedBy, theM_Country.ModifiedBy));
            values.Add(new FieldValue("ModifiedOn", original_M_Country.ModifiedOn, theM_Country.ModifiedOn));
            return(values.ToArray());
        }
Пример #2
0
        protected virtual int ExecuteAction(VSM.Data.Objects.M_Country theM_Country, VSM.Data.Objects.M_Country original_M_Country, string lastCommandName, string commandName, string dataView)
        {
            ActionArgs args = new ActionArgs();

            args.Controller      = "M_Country";
            args.View            = dataView;
            args.Values          = CreateFieldValues(theM_Country, original_M_Country);
            args.LastCommandName = lastCommandName;
            args.CommandName     = commandName;
            ActionResult result = ControllerFactory.CreateDataController().Execute("M_Country", dataView, args);

            result.RaiseExceptionIfErrors();
            result.AssignTo(theM_Country);
            return(result.RowsAffected);
        }
Пример #3
0
 public virtual int Delete(VSM.Data.Objects.M_Country theM_Country)
 {
     return(ExecuteAction(theM_Country, theM_Country, "Select", "Delete", DeleteView));
 }
Пример #4
0
 public virtual int Insert(VSM.Data.Objects.M_Country theM_Country)
 {
     return(ExecuteAction(theM_Country, new M_Country(), "New", "Insert", InsertView));
 }
Пример #5
0
 public virtual int Update(VSM.Data.Objects.M_Country theM_Country)
 {
     return(Update(theM_Country, SelectSingle(theM_Country.Country_Code)));
 }
Пример #6
0
 public virtual int Update(VSM.Data.Objects.M_Country theM_Country, VSM.Data.Objects.M_Country original_M_Country)
 {
     return(ExecuteAction(theM_Country, original_M_Country, "Edit", "Update", UpdateView));
 }
Пример #7
0
 public List <VSM.Data.Objects.M_Country> Select(VSM.Data.Objects.M_Country qbe)
 {
     return(Select(qbe.Country_Code, qbe.Country_Name_Locale, qbe.Country_Name_En, qbe.CreatedBy, qbe.CreatedOn, qbe.ModifiedBy, qbe.ModifiedOn));
 }
Пример #8
0
 public static List <VSM.Data.Objects.M_Country> Select(VSM.Data.Objects.M_Country qbe)
 {
     return(new M_CountryFactory().Select(qbe));
 }