public IUiObject BuildDataArea(UiDfObject.ChangedField changedField, string dataField, string dataLabel) { UiDataArea dataArea = new UiDataArea(); dataArea.DataField = dataField; dataArea.LabelVisible = true; dataArea.LabelText = dataLabel; dataArea.LabelTextWidth = UiConstants.LabelTextWidthDefault; dataArea.TableName = "COMISIO"; dataArea.PrimaryKey = ProviderConstants.PrimaryKey; dataArea.ItemSource = new DataTable(); return(dataArea); }
/// <summary> /// This build up a collection of object to be rendered and binded with the data templates. /// </summary> /// <param name="assistQuery"></param> /// <param name="changedField"></param> /// <returns></returns> public ObservableCollection <IUiObject> BuildRightPartObjects(UiDualDfSearchTextObject.OnAssistQueryRequestHandler assistQuery, UiDfObject.ChangedField changedField) { ObservableCollection <IUiObject> rightPageCollection = new ObservableCollection <IUiObject>(); UiDualDfSearchTextObject uiVendedor = new UiDualDfSearchTextObject("Vendedor", UiConstants.LabelTextWidthDefault); uiVendedor.OnAssistQuery += assistQuery; uiVendedor.OnChangedField += changedField; uiVendedor.DataFieldFirst = RightPartsFields[0]; uiVendedor.TableName = "COMISIO"; uiVendedor.AssistTableName = "VENDEDOR"; uiVendedor.AssistDataFieldFirst = "NUM_VENDE"; uiVendedor.AssistDataFieldSecond = "NOMBRE"; rightPageCollection.Add(uiVendedor); UiDualDfSearchTextObject uiMarket = new UiDualDfSearchTextObject("Mercado", UiConstants.LabelTextWidthDefault); uiMarket.OnAssistQuery += assistQuery; uiMarket.OnChangedField += changedField; uiMarket.DataFieldFirst = RightPartsFields[1]; uiMarket.AssistDataFieldFirst = "CODIGO"; uiMarket.AssistDataFieldSecond = "NOMBRE"; uiMarket.TableName = "COMISO"; uiMarket.AssistTableName = "MERCADO"; rightPageCollection.Add(uiMarket); UiDualDfSearchTextObject uiBusiness = new UiDualDfSearchTextObject("Negocio", UiConstants.LabelTextWidthDefault); uiBusiness.OnAssistQuery += assistQuery; uiBusiness.OnChangedField += changedField; uiBusiness.DataField = "NEGOCIO"; uiBusiness.AssistDataFieldFirst = "CODIGO"; uiBusiness.AssistDataFieldSecond = "NOMBRE"; uiBusiness.TableName = "COMISIO"; uiBusiness.AssistTableName = "NEGOCIO"; rightPageCollection.Add(uiBusiness); UiDualDfSearchTextObject uiCanal = new UiDualDfSearchTextObject("Canal", UiConstants.LabelTextWidthDefault); uiCanal.OnAssistQuery += assistQuery; uiCanal.OnChangedField += changedField; uiCanal.DataFieldFirst = "CANAL"; uiCanal.AssistDataFieldFirst = "CODIGO"; uiCanal.AssistDataFieldSecond = "NOMBRE"; uiCanal.AssistTableName = "CANAL"; uiCanal.TableName = "COMISIO"; rightPageCollection.Add(uiCanal); UiDualDfSearchTextObject uiClavePto = new UiDualDfSearchTextObject("Clave PPto", UiConstants.LabelTextWidthDefault); uiClavePto.OnAssistQuery += assistQuery; uiClavePto.OnChangedField += changedField; uiClavePto.DataFieldFirst = "CLAVEPPTO"; uiClavePto.AssistTableName = "CLAVEPTO"; uiClavePto.AssistDataFieldFirst = "COD_CLAVE"; uiClavePto.AssistDataFieldSecond = "NOMBRE"; uiClavePto.TableName = "COMISIO"; rightPageCollection.Add(uiClavePto); UiDualDfSearchTextObject uiOrigen = new UiDualDfSearchTextObject("Origen", UiConstants.LabelTextWidthDefault); uiOrigen.OnAssistQuery += assistQuery; uiOrigen.OnChangedField += changedField; uiOrigen.DataFieldFirst = "ORIGEN_COMI"; uiOrigen.AssistTableName = "ORIGEN"; uiOrigen.AssistDataFieldFirst = "NUM_ORIGEN"; uiOrigen.AssistDataFieldSecond = "NOMBRE"; uiOrigen.TableName = "COMISIO"; rightPageCollection.Add(uiOrigen); UiDualDfSearchTextObject officeZone = new UiDualDfSearchTextObject("Zona Ofi.", UiConstants.LabelTextWidthDefault); officeZone.OnAssistQuery += assistQuery; officeZone.OnChangedField += changedField; officeZone.DataFieldFirst = "ZONA_OFI"; officeZone.AssistTableName = "ZONAS"; officeZone.AssistDataFieldFirst = "NUM_ZONA"; officeZone.AssistDataFieldSecond = "NOMBRE"; officeZone.TableName = "COMISIO"; rightPageCollection.Add(officeZone); UiDataArea alert = new UiDataArea(); alert.DataField = "AVISO"; alert.OnChangedField += changedField; alert.TableName = "COMISIO"; rightPageCollection.Add(alert); return(rightPageCollection); }
private ObservableCollection <IUiObject> OrderCommunicationWay(UiDualDfSearchTextObject.OnAssistQueryRequestHandler assistQuery, UiDfObject.ChangedField changedField) { ObservableCollection <IUiObject> collection = new ObservableCollection <IUiObject>(); UiDualDfSearchTextObject viaDfSearch = new UiDualDfSearchTextObject(Resources.OrderCommunicationWay_Via, UiConstants.LabelTextWidthDefault); viaDfSearch.DataFieldFirst = "VIA"; viaDfSearch.TableName = "PROVEE1"; viaDfSearch.AssistDataFieldFirst = "NOMBRE"; viaDfSearch.AssistDataFieldSecond = "CODIGO"; viaDfSearch.AssistTableName = "VIASPEDIPRO"; viaDfSearch.ButtonImage = UiConstants.ImagePath; viaDfSearch.Height = UiConstants.TextboxHeight; viaDfSearch.TextContentFirstWidth = UiConstants.TextBoxWidthSmall; viaDfSearch.TextContentSecondWidth = UiConstants.TextBoxWidthLarge; viaDfSearch.SourceView = new DataTable(); viaDfSearch.ItemSource = new DataTable(); viaDfSearch.PrimaryKey = "NUM_PROVEE"; viaDfSearch.OnChangedField += changedField; viaDfSearch.OnAssistQuery += assistQuery; // UiDfObject direccionDePago = new UiDfObject(title, UiConstants.LabelTextWidthDefault); collection.Add(viaDfSearch); UiEmailDataField emailDfSearch = new UiEmailDataField(); emailDfSearch.LabelText = "Email"; emailDfSearch.LabelTextWidth = UiConstants.LabelTextWidthDefault; emailDfSearch.TextContentWidth = UiConstants.TextBoxWidthDefault; emailDfSearch.DataField = "EMAIL"; emailDfSearch.ButtonImage = UiConstants.EmailImagePath; emailDfSearch.TableName = "PROVEE1"; emailDfSearch.Height = UiConstants.TextboxHeight; emailDfSearch.ItemSource = new DataTable(); emailDfSearch.PrimaryKey = "NUM_PROVEE"; emailDfSearch.OnChangedField += changedField; emailDfSearch.EmailEventHandler += _emailCheckHandler; collection.Add(emailDfSearch); UiDualDfSearchTextObject fechaEntregaDfSearch = new UiDualDfSearchTextObject("F.Entrega", UiConstants.LabelTextWidthDefault); fechaEntregaDfSearch.DataFieldFirst = "FORMA_ENVIO"; fechaEntregaDfSearch.ButtonImage = UiConstants.ImagePath; fechaEntregaDfSearch.TableName = "PROVEE1"; fechaEntregaDfSearch.AssistDataFieldFirst = "NOMBRE"; fechaEntregaDfSearch.AssistDataFieldSecond = "CODIGO"; fechaEntregaDfSearch.AssistTableName = "FORMAS_PEDENT"; fechaEntregaDfSearch.Height = UiConstants.TextboxHeight; fechaEntregaDfSearch.TextContentFirstWidth = UiConstants.TextBoxWidthSmall; fechaEntregaDfSearch.TextContentSecondWidth = UiConstants.TextBoxWidthLarge; fechaEntregaDfSearch.SourceView = new DataTable(); fechaEntregaDfSearch.ItemSource = new DataTable(); fechaEntregaDfSearch.PrimaryKey = "NUM_PROVEE"; fechaEntregaDfSearch.OnChangedField += changedField; fechaEntregaDfSearch.OnAssistQuery += assistQuery; // UiDfObject direccionDePago = new UiDfObject(title, UiConstants.LabelTextWidthDefault); collection.Add(fechaEntregaDfSearch); UiDualDfSearchTextObject sellConditionDfSearch = new UiDualDfSearchTextObject("CondiciĆ³n Venta", UiConstants.LabelTextWidthDefault); sellConditionDfSearch.DataFieldFirst = "CONDICION_VENTA"; sellConditionDfSearch.ButtonImage = UiConstants.ImagePath; sellConditionDfSearch.TableName = "PROVEE1"; sellConditionDfSearch.AssistDataFieldFirst = "NOMBRE"; sellConditionDfSearch.AssistDataFieldSecond = "CODIGO"; sellConditionDfSearch.AssistTableName = "TL_CONDICION_PRECIO"; sellConditionDfSearch.Height = UiConstants.TextboxHeight; sellConditionDfSearch.TextContentFirstWidth = UiConstants.TextBoxWidthSmall; sellConditionDfSearch.TextContentSecondWidth = UiConstants.TextBoxWidthLarge; sellConditionDfSearch.SourceView = new DataTable(); sellConditionDfSearch.ItemSource = new DataTable(); sellConditionDfSearch.PrimaryKey = "NUM_PROVEE"; sellConditionDfSearch.OnChangedField += changedField; sellConditionDfSearch.OnAssistQuery += assistQuery; // UiDfObject direccionDePago = new UiDfObject(title, UiConstants.LabelTextWidthDefault); collection.Add(sellConditionDfSearch); UiDataArea deliveringArea = new UiDataArea(); deliveringArea.LabelVisible = true; deliveringArea.LabelTextWidth = UiConstants.LabelTextWidthWide; deliveringArea.PrimaryKey = ProviderConstants.PrimaryKey; deliveringArea.ItemSource = new DataTable(); deliveringArea.LabelText = "Lugares de Entrega"; deliveringArea.DataField = "DIRENVIO6"; deliveringArea.TableName = "PROVEE1"; deliveringArea.Height = UiConstants.TextboxHeight; deliveringArea.TextContentWidth = UiConstants.TextBoxWidthDefault; collection.Add(deliveringArea); return(collection); }