protected virtual FieldValue[] CreateFieldValues(MyCompany.Data.Objects.CustomerImport theCustomerImport, MyCompany.Data.Objects.CustomerImport original_CustomerImport) { List <FieldValue> values = new List <FieldValue>(); values.Add(new FieldValue("AutoId", original_CustomerImport.AutoId, theCustomerImport.AutoId, true)); values.Add(new FieldValue("Code", original_CustomerImport.Code, theCustomerImport.Code)); values.Add(new FieldValue("Name", original_CustomerImport.Name, theCustomerImport.Name)); values.Add(new FieldValue("Code2", original_CustomerImport.Code2, theCustomerImport.Code2)); values.Add(new FieldValue("Code3", original_CustomerImport.Code3, theCustomerImport.Code3)); values.Add(new FieldValue("LocationCode", original_CustomerImport.LocationCode, theCustomerImport.LocationCode)); values.Add(new FieldValue("PlantCode", original_CustomerImport.PlantCode, theCustomerImport.PlantCode)); values.Add(new FieldValue("AddressCode", original_CustomerImport.AddressCode, theCustomerImport.AddressCode)); values.Add(new FieldValue("Contact", original_CustomerImport.Contact, theCustomerImport.Contact)); values.Add(new FieldValue("Address", original_CustomerImport.Address, theCustomerImport.Address)); values.Add(new FieldValue("City", original_CustomerImport.City, theCustomerImport.City)); values.Add(new FieldValue("State", original_CustomerImport.State, theCustomerImport.State)); values.Add(new FieldValue("Country", original_CustomerImport.Country, theCustomerImport.Country)); values.Add(new FieldValue("ZIPCode", original_CustomerImport.ZIPCode, theCustomerImport.ZIPCode)); values.Add(new FieldValue("Phone", original_CustomerImport.Phone, theCustomerImport.Phone)); values.Add(new FieldValue("Mobile", original_CustomerImport.Mobile, theCustomerImport.Mobile)); values.Add(new FieldValue("Fax", original_CustomerImport.Fax, theCustomerImport.Fax)); values.Add(new FieldValue("Email", original_CustomerImport.Email, theCustomerImport.Email)); values.Add(new FieldValue("Remark", original_CustomerImport.Remark, theCustomerImport.Remark)); values.Add(new FieldValue("CreateBy", original_CustomerImport.CreateBy, theCustomerImport.CreateBy)); values.Add(new FieldValue("CreateDate", original_CustomerImport.CreateDate, theCustomerImport.CreateDate)); values.Add(new FieldValue("UpdateBy", original_CustomerImport.UpdateBy, theCustomerImport.UpdateBy)); values.Add(new FieldValue("UpdateDate", original_CustomerImport.UpdateDate, theCustomerImport.UpdateDate)); values.Add(new FieldValue("StatusCode", original_CustomerImport.StatusCode, theCustomerImport.StatusCode)); return(values.ToArray()); }
protected virtual int ExecuteAction(MyCompany.Data.Objects.CustomerImport theCustomerImport, MyCompany.Data.Objects.CustomerImport original_CustomerImport, string lastCommandName, string commandName, string dataView) { ActionArgs args = new ActionArgs(); args.Controller = "CustomerImport"; args.View = dataView; args.Values = CreateFieldValues(theCustomerImport, original_CustomerImport); args.LastCommandName = lastCommandName; args.CommandName = commandName; ActionResult result = ControllerFactory.CreateDataController().Execute("CustomerImport", dataView, args); result.RaiseExceptionIfErrors(); result.AssignTo(theCustomerImport); return(result.RowsAffected); }
public virtual int Delete(MyCompany.Data.Objects.CustomerImport theCustomerImport) { return(ExecuteAction(theCustomerImport, theCustomerImport, "Select", "Delete", DeleteView)); }
public virtual int Insert(MyCompany.Data.Objects.CustomerImport theCustomerImport) { return(ExecuteAction(theCustomerImport, new CustomerImport(), "New", "Insert", InsertView)); }
public virtual int Update(MyCompany.Data.Objects.CustomerImport theCustomerImport) { return(Update(theCustomerImport, SelectSingle(theCustomerImport.AutoId))); }
public virtual int Update(MyCompany.Data.Objects.CustomerImport theCustomerImport, MyCompany.Data.Objects.CustomerImport original_CustomerImport) { return(ExecuteAction(theCustomerImport, original_CustomerImport, "Edit", "Update", UpdateView)); }
public List <MyCompany.Data.Objects.CustomerImport> Select(MyCompany.Data.Objects.CustomerImport qbe) { return(Select(qbe.AutoId, qbe.Code, qbe.Name, qbe.Code2, qbe.Code3, qbe.LocationCode, qbe.PlantCode, qbe.AddressCode, qbe.Contact, qbe.Address, qbe.City, qbe.State, qbe.Country, qbe.ZIPCode, qbe.Phone, qbe.Mobile, qbe.Fax, qbe.Email, qbe.CreateBy, qbe.CreateDate, qbe.UpdateBy, qbe.UpdateDate, qbe.StatusCode)); }
public static List <MyCompany.Data.Objects.CustomerImport> Select(MyCompany.Data.Objects.CustomerImport qbe) { return(new CustomerImportFactory().Select(qbe)); }