コード例 #1
0
        public IUiObject BuildPhone(UiDfObject.ChangedField changedField)
        {
            UiMultipleDfObject multipleDfObject = new UiMultipleDfObject();
            int i = 8;

            for (int k = 0; k < 3; ++k)
            {
                UiDfObject dataDfObject = new UiDfObject();
                DataTable  table        = new DataTable();
                dataDfObject.ItemSource       = table;
                dataDfObject.DataField        = RightPartsFields[i];
                dataDfObject.LabelText        = ProviderConstants.LeftPartLabel[i];
                dataDfObject.LabelVisible     = true;
                dataDfObject.TextContentWidth = UiConstants.TextBoxWidthDefault;
                dataDfObject.Height           = UiConstants.TextboxHeight;
                dataDfObject.TableName        = "COMISIO";
                dataDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
                dataDfObject.IsReadOnly       = false;
                dataDfObject.PrimaryKey       = "NUM_COMI";
                dataDfObject.OnChangedField  += changedField;
                dataDfObject.AllowedEmpty     = true;
                multipleDfObject.AddDataField(dataDfObject);
                i++;
            }
            return(multipleDfObject);
        }
コード例 #2
0
        public void Should_Serialize_ObservableCollection()
        {
            ObservableCollection <IUiObject> obs = new ObservableCollection <IUiObject>();

            for (int i = 0; i < 10; i++)
            {
                var        payementPlaces = new UiMultipleDfObject();
                UiDfObject dataDfObject   = new UiDfObject
                {
                    LabelText        = "Plazo de Pago",
                    DataField        = "PLAZO",
                    TableName        = "PROVEE2",
                    LabelTextWidth   = "100",
                    LabelVisible     = true,
                    Height           = "100",
                    TextContentWidth = "50",
                    PrimaryKey       = "NUM_PROVEE",
                    AllowedEmpty     = true
                };
                payementPlaces.AddDataField(dataDfObject);
                // plazo de pago 2.

                var dataDfObject2 = new UiDfObject
                {
                    DataField        = "PLAZO2",
                    TableName        = "PROVEE2",
                    LabelVisible     = false,
                    Height           = "100",
                    TextContentWidth = "50",
                    PrimaryKey       = "NUM_PROVEE",
                    AllowedEmpty     = true
                };
                payementPlaces.AddDataField(dataDfObject2);
                // plazo de pago 3.
                UiDfObject dataDfObject3 = new UiDfObject();
                dataDfObject3.DataField        = "PLAZO3";
                dataDfObject3.TableName        = "PROVEE2";
                dataDfObject2.LabelVisible     = false;
                dataDfObject3.Height           = "100";
                dataDfObject3.TextContentWidth = "50";
                dataDfObject3.PrimaryKey       = "NUM_PROVEE";
                dataDfObject3.AllowedEmpty     = true;
                payementPlaces.AddDataField(dataDfObject3);
                obs.Add(payementPlaces);
            }

            ExtendedXmlSerializer serializer = new ExtendedXmlSerializer();
            var        xml    = serializer.Serialize(obs);
            TextWriter writer = new StreamWriter(@"C:\Users\Usuario\Documents\KarveSnapshots\Observe.xml");

            writer.Write(xml);
            writer.Close();
            TextReader reader     = new StreamReader(@"C:\Users\Usuario\Documents\KarveSnapshots\Observe.xml");
            string     xmlValue   = reader.ReadToEnd();
            var        collection = serializer.Deserialize <ObservableCollection <IUiObject> >(xmlValue);
        }
コード例 #3
0
        public void Should_DataField_Serialized()
        {
            UiDfObject prefixDfObject = new UiDfObject("Prefijo", "100");

            prefixDfObject.DataField        = "PREFIJO";
            prefixDfObject.TableName        = "PROVEE2";
            prefixDfObject.LabelVisible     = true;
            prefixDfObject.Height           = "100";
            prefixDfObject.TextContentWidth = "100";
            prefixDfObject.PrimaryKey       = "NUM_PROVEE";
            prefixDfObject.AllowedEmpty     = true;
            System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(prefixDfObject.GetType());
            TextWriter writer = new StreamWriter(@"C:\Users\Usuario\Documents\KarveSnapshots\Karve.xml");

            serializer.Serialize(writer, prefixDfObject);
        }
コード例 #4
0
        public void Should_UiMultipleDf_Serialized()
        {
            UiMultipleDfObject payementPlaces = new UiMultipleDfObject();
            UiDfObject         dataDfObject   = new UiDfObject();

            dataDfObject.LabelText        = "Plazo de Pago";
            dataDfObject.DataField        = "PLAZO";
            dataDfObject.TableName        = "PROVEE2";
            dataDfObject.LabelTextWidth   = "100";
            dataDfObject.LabelVisible     = true;
            dataDfObject.Height           = "100";
            dataDfObject.TextContentWidth = "50";
            dataDfObject.PrimaryKey       = "NUM_PROVEE";
            dataDfObject.AllowedEmpty     = true;
            payementPlaces.AddDataField(dataDfObject);
            // plazo de pago 2.

            UiDfObject dataDfObject2 = new UiDfObject();

            dataDfObject2.DataField        = "PLAZO2";
            dataDfObject2.TableName        = "PROVEE2";
            dataDfObject2.LabelVisible     = false;
            dataDfObject2.Height           = "100";
            dataDfObject2.TextContentWidth = "50";
            dataDfObject2.PrimaryKey       = "NUM_PROVEE";
            dataDfObject2.AllowedEmpty     = true;
            payementPlaces.AddDataField(dataDfObject2);
            // plazo de pago 3.
            UiDfObject dataDfObject3 = new UiDfObject();

            dataDfObject3.DataField        = "PLAZO3";
            dataDfObject3.TableName        = "PROVEE2";
            dataDfObject2.LabelVisible     = false;
            dataDfObject3.Height           = "100";
            dataDfObject3.TextContentWidth = "50";
            dataDfObject3.PrimaryKey       = "NUM_PROVEE";
            dataDfObject3.AllowedEmpty     = true;
            payementPlaces.AddDataField(dataDfObject3);
            ExtendedXmlSerializer serializer = new ExtendedXmlSerializer();

            var        xml    = serializer.Serialize(payementPlaces);
            TextWriter writer = new StreamWriter(@"C:\Users\Usuario\Documents\KarveSnapshots\PayPlaces.xml");

            writer.Write(xml);
            writer.Close();
        }
コード例 #5
0
        public IDictionary <string, ObservableCollection <IUiObject> > BuildPageObjects(UiDualDfSearchTextObject.OnAssistQueryRequestHandler assistQuery, UiDfObject.ChangedField changedField)
        {
            ObservableCollection <IUiObject> observableCollection           = new ObservableCollection <IUiObject>();
            IDictionary <string, ObservableCollection <IUiObject> > collect = new Dictionary <string, ObservableCollection <IUiObject> >();


            for (int i = 0; i < UpperPartFields.Length - 1; ++i)
            {
                UiDfObject dataUiDfObject = new UiDfObject();
                dataUiDfObject.LabelText        = ProviderConstants.UpperPartLabel[i];
                dataUiDfObject.DataField        = UpperPartFields[i];
                dataUiDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
                dataUiDfObject.TextContentWidth = UiConstants.TextBoxWidthDefault;
                dataUiDfObject.Height           = UiConstants.TextboxHeight;
                dataUiDfObject.TableName        = "PROVEE1";
                dataUiDfObject.PrimaryKey       = ProviderConstants.PrimaryKey;
                dataUiDfObject.OnChangedField  += changedField;
                dataUiDfObject.AllowedEmpty     = true;
                dataUiDfObject.IsReadOnly       = (dataUiDfObject.DataField == UpperPartFields[0]);
                dataUiDfObject.IsVisible        = true;
                if (dataUiDfObject.DataField == UpperPartFields[0])
                {
                    dataUiDfObject.TextContentWidth = UiConstants.TextBoxWidthSmall;
                }
                if (dataUiDfObject.DataField == UpperPartFields[1])
                {
                    dataUiDfObject.LabelTextWidth = UiConstants.LabelTextWidthDefault;
                    dataUiDfObject.TableName      = "PROVEE2";
                }
                else if (dataUiDfObject.DataField == UpperPartFields[2])
                {
                    dataUiDfObject.TextContentWidth = UiConstants.TextBoxWidthSmall;
                }
                DataTable table = new DataTable();
                dataUiDfObject.ItemSource = table;
                observableCollection.Add(dataUiDfObject);
            }
            IUiObject objectType = BuildUiSupplierTypeObject(assistQuery, changedField);

            observableCollection.Add(objectType);
            collect.Add(MasterModuleConstants.UiUpperPart, observableCollection);
            return(collect);
        }
コード例 #6
0
        /// <summary>
        ///  This build the direction from a fields of datas.
        /// </summary>
        /// <param name="fieldList">List of fields that shall be present: DataField, LabelText, TableName, PrimaryKey</param>
        /// <param name="changedField"></param>
        /// <returns></returns>
        protected IUiObject BuildDirection(IDictionary <string, string> fieldList, UiDfObject.ChangedField changedField)
        {
            UiDfObject dataDfObject = new UiDfObject();

            dataDfObject.DataField        = fieldList["DataField"];
            dataDfObject.LabelText        = fieldList["Label"];
            dataDfObject.LabelVisible     = true;
            dataDfObject.TextContentWidth = UiConstants.TextBoxWidthLarge;
            dataDfObject.Height           = UiConstants.TextboxHeight;
            dataDfObject.TableName        = fieldList["Table"];
            dataDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dataDfObject.IsReadOnly       = false;
            dataDfObject.ItemSource       = new DataTable();
            dataDfObject.IsVisible        = true;
            dataDfObject.PrimaryKey       = fieldList["PrimaryKey"];
            dataDfObject.OnChangedField  += changedField;
            dataDfObject.AllowedEmpty     = true;
            return(dataDfObject);
        }
コード例 #7
0
        private IUiObject BuildField(int fieldPos, UiDfObject.ChangedField changedField)
        {
            UiDfObject dataDfObject = new UiDfObject();
            DataTable  table        = new DataTable();

            dataDfObject.ItemSource       = table;
            dataDfObject.DataField        = LeftPartsFields[fieldPos];
            dataDfObject.LabelText        = ProviderConstants.LeftPartLabel[fieldPos];
            dataDfObject.LabelVisible     = true;
            dataDfObject.TextContentWidth = UiConstants.TextBoxWidthDefault;
            dataDfObject.Height           = UiConstants.TextboxHeight;
            dataDfObject.TableName        = "COMISIO";
            dataDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dataDfObject.IsReadOnly       = false;
            dataDfObject.PrimaryKey       = "NUM_COMI";
            dataDfObject.OnChangedField  += changedField;
            dataDfObject.AllowedEmpty     = true;
            return(dataDfObject);
        }
コード例 #8
0
        public SimpleViewModel()
        {
            // get values from db.
            UiDfObject dfObject0 = new UiDfObject();

            dfObject0.LabelText        = "Nombre";
            dfObject0.LabelVisible     = true;
            dfObject0.DataField        = "NOMBRE";
            dfObject0.TableName        = "PROVE1";
            dfObject0.TextContent      = "Luca Deri";
            dfObject0.TextContentWidth = "60";
            dfObject0.TableName        = "Auxliares";

            DataTable  workTable = new DataTable();
            DataColumn workCol   = workTable.Columns.Add("Nombre", typeof(string));
            DataRow    row       = workTable.NewRow();

            row["Nombre"] = "Marta";
            workTable.Rows.Add(row);
            dfObject0.ItemSource = workTable;
            UiSearchTextObject dfObject1 = new UiSearchTextObject();

            dfObject1.LabelText        = "Nombre";
            dfObject1.TableName        = "PROVE1";
            dfObject1.LabelVisible     = true;
            dfObject1.TextContent      = "Luca Deri";
            dfObject1.TextContentWidth = "60";
            dfObject1.AssistDataField  = "Nombre";
            dfObject1.DataField        = "Nombre";
            DataTable  workTable3 = new DataTable();
            DataColumn workCol1   = workTable3.Columns.Add("Nombre", typeof(string));
            DataRow    row8       = workTable3.NewRow();

            row8["Nombre"] = "Luigi";
            workTable3.Rows.Add(row8);
            dfObject1.SourceView = workTable3;
            _list.Add(dfObject0);
            _list.Add(dfObject0);
            _list.Add(dfObject1);
        }
コード例 #9
0
        private ObservableCollection <IUiObject> LoadInvocingData(UiDualDfSearchTextObject.OnAssistQueryRequestHandler assistQuery,
                                                                  UiDfObject.ChangedField changedField)
        {
            ObservableCollection <IUiObject> invoicingObjects = new ObservableCollection <IUiObject>();

            UiDualDfSearchTextObject paymentSearchBox = new UiDualDfSearchTextObject(Resources.FormaDePago, UiConstants.LabelTextWidthDefault);

            paymentSearchBox.DataFieldFirst         = "FORPA";
            paymentSearchBox.TableName              = "PROVEE2";
            paymentSearchBox.AssistTableName        = "FORMAS";
            paymentSearchBox.AssistDataFieldFirst   = "CODIGO";
            paymentSearchBox.AssistDataFieldSecond  = "NOMBRE";
            paymentSearchBox.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            paymentSearchBox.TextContentSecondWidth = UiConstants.TextBoxWidthDefault;
            paymentSearchBox.Height          = UiConstants.TextboxHeight;
            paymentSearchBox.SourceView      = new DataTable();
            paymentSearchBox.ItemSource      = new DataTable();
            paymentSearchBox.PrimaryKey      = "NUM_PROVEE";
            paymentSearchBox.OnChangedField += changedField;
            paymentSearchBox.ButtonImage     = MasterModuleConstants.ImagePath;
            paymentSearchBox.DataField       = "FORPA";
            paymentSearchBox.OnAssistQuery  += assistQuery;
            invoicingObjects.Add(paymentSearchBox);

            UiMultipleDfObject payementPlaces = new UiMultipleDfObject();
            UiDfObject         dataDfObject   = new UiDfObject();

            dataDfObject.LabelText        = Resources.PlazoDePago;
            dataDfObject.DataField        = "PLAZO";
            dataDfObject.TableName        = "PROVEE2";
            dataDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dataDfObject.LabelVisible     = true;
            dataDfObject.Height           = UiConstants.TextboxHeight;
            dataDfObject.TextContentWidth = "50";
            dataDfObject.OnChangedField  += changedField;
            dataDfObject.ItemSource       = new DataTable();
            dataDfObject.PrimaryKey       = "NUM_PROVEE";
            dataDfObject.AllowedEmpty     = true;
            payementPlaces.AddDataField(dataDfObject);
            // plazo de pago 2.

            UiDfObject dataDfObject2 = new UiDfObject();

            dataDfObject2.DataField        = "PLAZO2";
            dataDfObject2.TableName        = "PROVEE2";
            dataDfObject2.LabelVisible     = false;
            dataDfObject2.Height           = UiConstants.TextboxHeight;
            dataDfObject2.TextContentWidth = "50";
            dataDfObject2.OnChangedField  += changedField;
            dataDfObject2.PrimaryKey       = "NUM_PROVEE";
            dataDfObject2.AllowedEmpty     = true;
            dataDfObject2.ItemSource       = new DataTable();
            payementPlaces.AddDataField(dataDfObject2);
            // plazo de pago 3.
            UiDfObject dataDfObject3 = new UiDfObject();

            dataDfObject3.DataField        = "PLAZO3";
            dataDfObject3.TableName        = "PROVEE2";
            dataDfObject2.LabelVisible     = false;
            dataDfObject3.Height           = UiConstants.TextboxHeight;
            dataDfObject3.TextContentWidth = "50";
            dataDfObject3.OnChangedField  += changedField;
            dataDfObject3.PrimaryKey       = "NUM_PROVEE";
            dataDfObject3.AllowedEmpty     = true;
            dataDfObject3.ItemSource       = new DataTable();

            payementPlaces.AddDataField(dataDfObject3);
            // dias de pago
            UiDfObject payDfObject = new UiDfObject("Dias de pago", UiConstants.LabelTextWidthDefault);

            payDfObject.DataField        = "DIA";
            payDfObject.TableName        = "PROVEE2";
            payDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            payDfObject.LabelVisible     = true;
            payDfObject.Height           = UiConstants.TextboxHeight;
            payDfObject.TextContentWidth = "50";
            payDfObject.IsVisible        = true;
            payDfObject.OnChangedField  += changedField;
            payDfObject.PrimaryKey       = "NUM_PROVEE";
            payDfObject.AllowedEmpty     = true;
            payementPlaces.AddDataField(payDfObject);
            UiDfObject payDfObject1 = new UiDfObject();

            payDfObject1.DataField        = "DIA2";
            payDfObject1.TableName        = "PROVEE2";
            payDfObject1.ItemSource       = new DataTable();
            payDfObject.IsVisible         = true;
            payDfObject1.LabelVisible     = false;
            payDfObject1.Height           = UiConstants.TextboxHeight;
            payDfObject1.TextContentWidth = "50";
            payDfObject1.OnChangedField  += changedField;
            payDfObject1.PrimaryKey       = "NUM_PROVEE";
            payDfObject1.AllowedEmpty     = true;
            payementPlaces.AddDataField(payDfObject1);
            UiDfObject payDfObject2 = new UiDfObject();

            payDfObject2.DataField        = "DIA3";
            payDfObject2.TableName        = "PROVEE2";
            payDfObject2.LabelVisible     = false;
            payDfObject.IsVisible         = true;
            payDfObject2.Height           = UiConstants.TextboxHeight;
            payDfObject2.TextContentWidth = "50";
            payDfObject2.OnChangedField  += changedField;
            payDfObject2.PrimaryKey       = "NUM_PROVEE";
            payDfObject2.AllowedEmpty     = true;
            payementPlaces.AddDataField(payDfObject2);
            invoicingObjects.Add(payementPlaces);



            UiMultipleDfObject saleRowMultipleDfObject = new UiMultipleDfObject();

            saleRowMultipleDfObject.TableName = "PROVEE2";
            UiDfObject saleDfObject = new UiDfObject("Descuento", UiConstants.LabelTextWidthDefault);

            saleDfObject.DataField        = "DTO";
            saleDfObject.TableName        = "PROVEE2";
            saleDfObject.Height           = UiConstants.TextboxHeight;
            saleDfObject.ItemSource       = new DataTable();
            saleDfObject.PrimaryKey       = "NUM_PROVEE";
            saleDfObject.OnChangedField  += changedField;
            saleDfObject.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            saleDfObject.LabelVisible     = true;
            saleDfObject.Height           = UiConstants.TextboxHeight;
            saleDfObject.TextContentWidth = UiConstants.TextBoxWidthSmall;
            saleRowMultipleDfObject.AddDataField(saleDfObject);

            UiDfObject readyPayment = new UiDfObject("Pronto Pago", UiConstants.LabelTextWidthDefault);

            readyPayment.DataField        = "PP";
            readyPayment.TableName        = "PROVEE2";
            readyPayment.ItemSource       = new DataTable();
            readyPayment.PrimaryKey       = "NUM_PROVEE";
            readyPayment.OnChangedField  += changedField;
            readyPayment.ItemSource       = new DataTable();
            readyPayment.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            readyPayment.LabelVisible     = true;
            readyPayment.Height           = UiConstants.TextboxHeight;
            readyPayment.TextContentWidth = UiConstants.TextBoxWidthSmall;
            saleRowMultipleDfObject.AddDataField(readyPayment);

            UiDfObject readyPayment1 = new UiDfObject("Tipo Iva", UiConstants.LabelTextWidthDefault);

            readyPayment1.DataField        = "TIPOIVA";
            readyPayment1.TableName        = "PROVEE1";
            readyPayment1.ItemSource       = new DataTable();
            readyPayment1.PrimaryKey       = "NUM_PROVEE";
            readyPayment1.OnChangedField  += changedField;
            readyPayment1.ItemSource       = new DataTable();
            readyPayment1.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            readyPayment1.LabelVisible     = true;
            readyPayment1.Height           = UiConstants.TextboxHeight;
            readyPayment1.TextContentWidth = UiConstants.TextBoxWidthSmall;
            saleRowMultipleDfObject.AddDataField(readyPayment1);

            invoicingObjects.Add(saleRowMultipleDfObject);
            // mese vacaciones 1

            UiMultipleDfObject vacaciones = new UiMultipleDfObject();


            UiDualDfSearchTextObject vacationMonth1 = new UiDualDfSearchTextObject("Mes vacaciones", UiConstants.LabelTextWidthDefault);

            vacationMonth1.DataFieldFirst        = "MESVACA";
            vacationMonth1.TableName             = "PROVEE1";
            vacationMonth1.AssistTableName       = "MESES";
            vacationMonth1.AssistDataFieldFirst  = "NUMERO_MES";
            vacationMonth1.AssistDataFieldSecond = "MES";
            vacationMonth1.Height                 = UiConstants.TextboxHeight;
            vacationMonth1.SourceView             = new DataTable();
            vacationMonth1.ItemSource             = new DataTable();
            vacationMonth1.PrimaryKey             = "NUM_PROVEE";
            vacationMonth1.OnChangedField        += changedField;
            vacationMonth1.ButtonImage            = MasterModuleConstants.ImagePath;
            vacationMonth1.DataField              = "MESVACA";
            vacationMonth1.OnAssistQuery         += assistQuery;
            vacationMonth1.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            vacationMonth1.TextContentSecondWidth = UiConstants.TextBoxWidthSmall;

            vacaciones.AddDataField(vacationMonth1);

            UiDualDfSearchTextObject vacationMonth2 = new UiDualDfSearchTextObject("Segundo Mes", UiConstants.LabelTextWidthDefault);

            vacationMonth2.DataFieldFirst        = "MESVACA2";
            vacationMonth2.TableName             = "PROVEE1";
            vacationMonth2.AssistTableName       = "MESES";
            vacationMonth2.AssistDataFieldFirst  = "NUMERO_MES";
            vacationMonth2.AssistDataFieldSecond = "MES";
            vacationMonth2.Height          = UiConstants.TextboxHeight;
            vacationMonth2.SourceView      = new DataTable();
            vacationMonth2.ItemSource      = new DataTable();
            vacationMonth2.PrimaryKey      = "NUM_PROVEE";
            vacationMonth2.OnChangedField += changedField;
            vacationMonth2.ButtonImage     = MasterModuleConstants.ImagePath;
            vacationMonth2.DataField       = "MESVACA2";
            vacationMonth2.OnAssistQuery  += assistQuery;
            vacaciones.AddDataField(vacationMonth2);
            invoicingObjects.Add(vacaciones);


            UiDfObject cuenta = new UiDfObject("Cuenta Bancaria", UiConstants.LabelTextWidthDefault);

            cuenta.DataAllowed      = ControlExt.DataType.BankAccount;
            cuenta.DataField        = "CC";
            cuenta.TableName        = "PROVEE1";
            cuenta.ItemSource       = new DataTable();
            cuenta.LabelVisible     = true;
            cuenta.Height           = UiConstants.TextboxHeight;
            cuenta.TextContentWidth = UiConstants.TextBoxWidthLarge;
            cuenta.OnChangedField  += changedField;
            invoicingObjects.Add(cuenta);

            UiDfObject cuenta1 = new UiDfObject("IBAN", UiConstants.LabelTextWidthDefault);

            cuenta1.DataAllowed      = ControlExt.DataType.BankAccount;
            cuenta1.DataField        = "IBAN";
            cuenta1.TableName        = "PROVEE1";
            cuenta1.DataAllowed      = ControlExt.DataType.IbanField;
            cuenta1.ItemSource       = new DataTable();
            cuenta1.LabelVisible     = true;
            cuenta1.Height           = UiConstants.TextboxHeight;
            cuenta1.TextContentWidth = UiConstants.TextBoxWidthLarge;
            cuenta1.OnChangedField  += changedField;
            invoicingObjects.Add(cuenta1);

            UiMultipleDfObject uiBancosDfObject = new UiMultipleDfObject();

            UiDualDfSearchTextObject uiDualDfSearch = new UiDualDfSearchTextObject("Banco", UiConstants.LabelTextWidthDefault);

            uiDualDfSearch.ButtonImage           = MasterModuleConstants.ImagePath;
            uiDualDfSearch.AssistDataFieldFirst  = "CODBAN";
            uiDualDfSearch.AssistDataFieldSecond = "NOMBRE";
            uiDualDfSearch.AssistTableName       = "BANCO";
            uiDualDfSearch.Height                 = UiConstants.TextboxHeight;
            uiDualDfSearch.IsVisible              = true;
            uiDualDfSearch.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            uiDualDfSearch.TextContentSecondWidth = UiConstants.TextBoxWidthDefault;
            uiDualDfSearch.PrimaryKey             = "NUM_PROVEE";
            uiDualDfSearch.TableName              = "PROVEE1";
            uiDualDfSearch.OnChangedField        += changedField;
            uiDualDfSearch.IsReadOnlySecond       = true;
            uiDualDfSearch.IsReadOnlyFirst        = false;
            uiDualDfSearch.LabelVisible           = true;
            uiDualDfSearch.LabelTextWidth         = UiConstants.LabelTextWidthDefault;
            uiDualDfSearch.DataFieldFirst         = "BANCO";
            uiDualDfSearch.DataField              = "BANCO";
            uiDualDfSearch.ItemSource             = new DataTable();
            uiDualDfSearch.SourceView             = new DataTable();
            uiDualDfSearch.OnAssistQuery         += assistQuery;
            uiBancosDfObject.AddDataField(uiDualDfSearch);
            UiDfObject swifDfObject = new UiDfObject("SWIFT", UiConstants.LabelTextWidthDefault);

            swifDfObject.DataAllowed      = ControlExt.DataType.Swift;
            swifDfObject.DataField        = "SWIFT";
            swifDfObject.TableName        = "PROVEE1";
            swifDfObject.ItemSource       = new DataTable();
            swifDfObject.LabelVisible     = true;
            swifDfObject.Height           = UiConstants.TextboxHeight;
            swifDfObject.TextContentWidth = UiConstants.TextBoxWidthSmall;
            swifDfObject.OnChangedField  += changedField;
            uiBancosDfObject.AddDataField(swifDfObject);
            invoicingObjects.Add(uiBancosDfObject);
            UiMultipleDfObject uiIdiomaDivisDfObject = new UiMultipleDfObject();

            UiDualDfSearchTextObject uiIdioma = new UiDualDfSearchTextObject("Idioma", UiConstants.LabelTextWidthDefault);

            uiIdioma.ButtonImage           = MasterModuleConstants.ImagePath;
            uiIdioma.AssistDataFieldFirst  = "CODIGO";
            uiIdioma.AssistDataFieldSecond = "NOMBRE";
            uiIdioma.AssistTableName       = "IDIOMAS";
            uiIdioma.Height                 = UiConstants.TextboxHeight;
            uiIdioma.IsVisible              = true;
            uiIdioma.PrimaryKey             = "NUM_PROVEE";
            uiIdioma.TableName              = "PROVEE1";
            uiIdioma.OnChangedField        += changedField;
            uiIdioma.IsReadOnlySecond       = true;
            uiIdioma.IsReadOnlyFirst        = false;
            uiIdioma.LabelVisible           = true;
            uiIdioma.LabelTextWidth         = UiConstants.LabelTextWidthDefault;
            uiIdioma.DataFieldFirst         = "IDIOMA_PR1";
            uiIdioma.DataField              = "IDIOMA_PR1";
            uiIdioma.ItemSource             = new DataTable();
            uiIdioma.SourceView             = new DataTable();
            uiIdioma.OnAssistQuery         += assistQuery;
            uiIdioma.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            uiIdioma.TextContentSecondWidth = UiConstants.TextBoxWidthDefault;
            uiIdiomaDivisDfObject.AddDataField(uiIdioma);
            UiDualDfSearchTextObject uiDivisa = new UiDualDfSearchTextObject("Divisa", UiConstants.LabelTextWidthDefault);

            uiDivisa.ButtonImage           = MasterModuleConstants.ImagePath;
            uiDivisa.AssistDataFieldFirst  = "CODIGO";
            uiDivisa.AssistDataFieldSecond = "NOMBRE";
            uiDivisa.AssistTableName       = "DIVISAS";
            uiDivisa.Height           = UiConstants.TextboxHeight;
            uiDivisa.IsVisible        = true;
            uiDivisa.PrimaryKey       = "NUM_PROVEE";
            uiDivisa.TableName        = "PROVEE2";
            uiDivisa.OnChangedField  += changedField;
            uiDivisa.IsReadOnlySecond = true;
            uiDivisa.IsReadOnlyFirst  = false;
            uiDivisa.LabelVisible     = true;
            uiDivisa.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            uiDivisa.DataFieldFirst   = "DIVISA";
            uiDivisa.DataField        = "DIVISA";
            uiDivisa.ItemSource       = new DataTable();
            uiDivisa.SourceView       = new DataTable();
            uiDivisa.OnAssistQuery   += assistQuery;
            uiIdiomaDivisDfObject.AddDataField(uiDivisa);
            invoicingObjects.Add(uiIdiomaDivisDfObject);
            return(invoicingObjects);
        }
コード例 #10
0
        public ObservableCollection <IUiObject> LoadAccounts(UiDualDfSearchTextObject.OnAssistQueryRequestHandler assistQuery, UiDfObject.ChangedField changedField)
        {
            ObservableCollection <IUiObject> observableCollection = new ObservableCollection <IUiObject>();

            UiMultipleDfObject accountDfObject1 = new UiMultipleDfObject();
            UiDfObject         prefixDfObject   = new UiDfObject(Resources.Prefijo, UiConstants.LabelTextWidthDefault);

            prefixDfObject.DataField        = "PREFIJO";
            prefixDfObject.TableName        = "PROVEE2";
            prefixDfObject.LabelVisible     = true;
            prefixDfObject.Height           = UiConstants.TextboxHeight;
            prefixDfObject.TextContentWidth = UiConstants.TextBoxWidthSmall;
            prefixDfObject.OnChangedField  += changedField;
            prefixDfObject.PrimaryKey       = "NUM_PROVEE";
            prefixDfObject.AllowedEmpty     = true;
            prefixDfObject.ItemSource       = new DataTable();
            accountDfObject1.AddDataField(prefixDfObject);

            UiDualDfSearchTextObject cuentaContable = new UiDualDfSearchTextObject("Cuenta Contable", UiConstants.LabelTextWidthDefault);

            cuentaContable.DataFieldFirst        = "CONTABLE";
            cuentaContable.TableName             = "PROVEE2";
            cuentaContable.AssistTableName       = "CU1";
            cuentaContable.AssistDataFieldFirst  = "CODIGO";
            cuentaContable.AssistDataFieldSecond = "DESCRIP";
            cuentaContable.Height = UiConstants.TextboxHeight;
            cuentaContable.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            cuentaContable.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            cuentaContable.SourceView             = new DataTable();
            cuentaContable.ItemSource             = new DataTable();
            cuentaContable.PrimaryKey             = "NUM_PROVEE";
            cuentaContable.OnChangedField        += changedField;
            cuentaContable.ButtonImage            = MasterModuleConstants.ImagePath;
            cuentaContable.DataField      = "CONTABLE";
            cuentaContable.OnAssistQuery += assistQuery;
            accountDfObject1.AddDataField(cuentaContable);
            observableCollection.Add(accountDfObject1);

            UiDualDfSearchTextObject cuentaGasto = new UiDualDfSearchTextObject("Cuenta Gasto", UiConstants.LabelTextWidthDefault);

            cuentaGasto.DataFieldFirst        = "CUGASTO";
            cuentaGasto.TableName             = "PROVEE2";
            cuentaGasto.AssistTableName       = "CU1";
            cuentaGasto.AssistDataFieldFirst  = "CODIGO";
            cuentaGasto.AssistDataFieldSecond = "DESCRIP";
            cuentaGasto.Height = UiConstants.TextboxHeight;
            cuentaGasto.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            cuentaGasto.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            cuentaGasto.SourceView             = new DataTable();
            cuentaGasto.ItemSource             = new DataTable();
            cuentaGasto.PrimaryKey             = "NUM_PROVEE";
            cuentaGasto.OnChangedField        += changedField;
            cuentaGasto.ButtonImage            = MasterModuleConstants.ImagePath;
            cuentaGasto.DataField      = "CONTABLE";
            cuentaGasto.OnAssistQuery += assistQuery;
            observableCollection.Add(cuentaGasto);
            // cuenta retencion
            UiDualDfSearchTextObject retentionAccount = new UiDualDfSearchTextObject("Cuenta Retencion", UiConstants.LabelTextWidthDefault);

            retentionAccount.DataFieldFirst        = "RETENCION";
            retentionAccount.TableName             = "PROVEE2";
            retentionAccount.AssistTableName       = "CU1";
            retentionAccount.AssistDataFieldFirst  = "CODIGO";
            retentionAccount.AssistDataFieldSecond = "DESCRIP";
            retentionAccount.Height = UiConstants.TextboxHeight;
            retentionAccount.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            retentionAccount.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            retentionAccount.SourceView             = new DataTable();
            retentionAccount.ItemSource             = new DataTable();
            retentionAccount.PrimaryKey             = "NUM_PROVEE";
            retentionAccount.OnChangedField        += changedField;
            retentionAccount.ButtonImage            = MasterModuleConstants.ImagePath;
            retentionAccount.DataField      = "CONTABLE";
            retentionAccount.OnAssistQuery += assistQuery;
            observableCollection.Add(retentionAccount);
            // cuenta pago
            UiDualDfSearchTextObject cuentaPago = new UiDualDfSearchTextObject("Cuenta Pago", UiConstants.LabelTextWidthDefault);

            cuentaPago.DataFieldFirst        = "CTAPAGO";
            cuentaPago.TableName             = "PROVEE1";
            cuentaPago.AssistTableName       = "CU1";
            cuentaPago.AssistDataFieldFirst  = "CODIGO";
            cuentaPago.AssistDataFieldSecond = "DESCRIP";
            cuentaPago.Height = UiConstants.TextboxHeight;
            cuentaPago.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            cuentaPago.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            cuentaPago.SourceView             = new DataTable();
            cuentaPago.ItemSource             = new DataTable();
            cuentaPago.PrimaryKey             = "NUM_PROVEE";
            cuentaPago.OnChangedField        += changedField;
            cuentaPago.ButtonImage            = MasterModuleConstants.ImagePath;
            cuentaPago.DataField      = "CTAPAGO";
            cuentaPago.OnAssistQuery += assistQuery;
            observableCollection.Add(cuentaPago);
            return(observableCollection);
        }
コード例 #11
0
        private ObservableCollection <IUiObject> LoadDirections(ref UiDualDfSearchTextObject.OnAssistQueryRequestHandler assistQuery,
                                                                ref UiDfObject.ChangedField changedField, IDictionary <string, string> dataDictionary)
        {
            ObservableCollection <IUiObject> collection = new ObservableCollection <IUiObject>();
            UiDfObject direccionDePago = new UiDfObject("Dirección", UiConstants.LabelTextWidthDefault);

            direccionDePago.DataField        = dataDictionary[FirstDirectionDf];
            direccionDePago.TableName        = dataDictionary[FirstTableDirectionDf];;
            direccionDePago.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            direccionDePago.LabelVisible     = true;
            direccionDePago.Height           = UiConstants.TextboxHeight;
            direccionDePago.TextContentWidth = UiConstants.TextBoxWidthWide;
            direccionDePago.OnChangedField  += changedField;
            direccionDePago.ItemSource       = new DataTable();
            direccionDePago.PrimaryKey       = "NUM_PROVEE";
            direccionDePago.AllowedEmpty     = true;
            collection.Add(direccionDePago);
            UiDfObject direccionDePago1 = new UiDfObject("Segunda Dirección", UiConstants.LabelTextWidthDefault);

            direccionDePago1.DataField        = dataDictionary[SecondDirectionDf];
            direccionDePago1.TableName        = dataDictionary[SecondTableDirectionDf];
            direccionDePago1.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            direccionDePago1.LabelVisible     = true;
            direccionDePago1.Height           = UiConstants.TextboxHeight;
            direccionDePago1.TextContentWidth = UiConstants.TextBoxWidthDefault;
            direccionDePago1.OnChangedField  += changedField;
            direccionDePago1.ItemSource       = new DataTable();
            direccionDePago1.PrimaryKey       = "NUM_PROVEE";
            direccionDePago1.AllowedEmpty     = true;
            collection.Add(direccionDePago1);
            UiDualDfSearchTextObject dualDfSearch = new UiDualDfSearchTextObject("CP", UiConstants.LabelTextWidthDefault);

            dualDfSearch.DataFieldFirst = dataDictionary[CpDataField];
            dualDfSearch.DataField      = dataDictionary[CpDataField];

            dualDfSearch.ButtonImage           = UiConstants.ImagePath;
            dualDfSearch.TableName             = dataDictionary[CpTableName];
            dualDfSearch.AssistDataFieldFirst  = CpAssistDataFieldFirst;
            dualDfSearch.AssistDataFieldSecond = CpAssistDataFieldSecond;
            dualDfSearch.AssistTableName       = "PROVEE1";
            dualDfSearch.Height                 = UiConstants.TextboxHeight;
            dualDfSearch.IsReadOnlySecond       = true;
            dualDfSearch.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            dualDfSearch.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            dualDfSearch.SourceView             = new DataTable();
            dualDfSearch.ItemSource             = new DataTable();
            dualDfSearch.PrimaryKey             = "NUM_PROVEE";
            dualDfSearch.OnChangedField        += changedField;
            dualDfSearch.OnAssistQuery         += assistQuery;
            collection.Add(dualDfSearch);
            UiDualDfSearchTextObject provDfSearchTextObject = new UiDualDfSearchTextObject("Provincia", UiConstants.LabelTextWidthDefault);

            provDfSearchTextObject.DataFieldFirst         = dataDictionary[ProvDataField];
            provDfSearchTextObject.ButtonImage            = UiConstants.ImagePath;
            provDfSearchTextObject.TableName              = dataDictionary[ProvTableName];
            provDfSearchTextObject.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            provDfSearchTextObject.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            provDfSearchTextObject.AssistDataFieldFirst   = dataDictionary[ProvAssistDataFieldFirst];
            provDfSearchTextObject.AssistDataFieldSecond  = dataDictionary[ProvAssistDataFieldSecond];
            provDfSearchTextObject.IsReadOnlySecond       = true;
            provDfSearchTextObject.AssistTableName        = "PROVINCIA";
            provDfSearchTextObject.SourceView             = new DataTable();
            provDfSearchTextObject.ItemSource             = new DataTable();
            provDfSearchTextObject.PrimaryKey             = "NUM_PROVEE";
            provDfSearchTextObject.OnChangedField        += changedField;
            provDfSearchTextObject.OnAssistQuery         += assistQuery;
            collection.Add(provDfSearchTextObject);
            UiDualDfSearchTextObject paisDfSearchTextObject = new UiDualDfSearchTextObject("Pais", UiConstants.LabelTextWidthDefault);

            paisDfSearchTextObject.DataFieldFirst         = dataDictionary[PaisDataField];
            paisDfSearchTextObject.ButtonImage            = UiConstants.ImagePath;
            paisDfSearchTextObject.TableName              = dataDictionary[PaisTableName];
            paisDfSearchTextObject.AssistDataFieldFirst   = "SIGLAS";
            paisDfSearchTextObject.AssistDataFieldSecond  = "PAIS";
            paisDfSearchTextObject.TextContentFirstWidth  = UiConstants.TextBoxWidthSmall;
            paisDfSearchTextObject.TextContentSecondWidth = UiConstants.TextBoxWidthLarge;
            paisDfSearchTextObject.IsReadOnlySecond       = true;
            paisDfSearchTextObject.AssistTableName        = "PAIS";
            paisDfSearchTextObject.SourceView             = new DataTable();
            paisDfSearchTextObject.ItemSource             = new DataTable();
            paisDfSearchTextObject.PrimaryKey             = "NUM_PROVEE";
            paisDfSearchTextObject.OnChangedField        += changedField;
            paisDfSearchTextObject.OnAssistQuery         += assistQuery;
            collection.Add(paisDfSearchTextObject);

            UiMultipleDfObject multipleDfObject = new UiMultipleDfObject();
            // Data Field object 1
            UiDfObject dfObject1 = new UiDfObject("Telefonos", UiConstants.LabelTextWidthDefault);

            dfObject1.DataField        = dataDictionary[TelefonoDataField];
            dfObject1.TableName        = dataDictionary[TelefonoTableName];
            dfObject1.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dfObject1.LabelVisible     = true;
            dfObject1.Height           = UiConstants.TextboxHeight;
            dfObject1.TextContentWidth = UiConstants.TextBoxWidthDefault;
            dfObject1.OnChangedField  += changedField;
            dfObject1.ItemSource       = new DataTable();
            dfObject1.PrimaryKey       = "NUM_PROVEE";
            dfObject1.AllowedEmpty     = true;
            // Data field object 2
            UiDfObject dfObject2 = new UiDfObject("Fax", UiConstants.LabelTextWidthDefault);

            dfObject2.DataField        = dataDictionary[FaxDataField];
            dfObject2.TableName        = dataDictionary[FaxTableName];
            dfObject2.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dfObject2.LabelVisible     = true;
            dfObject2.Height           = UiConstants.TextboxHeight;
            dfObject2.TextContentWidth = UiConstants.TextBoxWidthDefault;
            dfObject2.OnChangedField  += changedField;
            dfObject2.ItemSource       = new DataTable();
            dfObject2.PrimaryKey       = "NUM_PROVEE";
            dfObject2.AllowedEmpty     = true;
            multipleDfObject.AddDataField(dfObject1);
            multipleDfObject.AddDataField(dfObject2);
            collection.Add(multipleDfObject);
            // data field persona.
            UiDfObject dfPersona = new UiDfObject("Persona", UiConstants.LabelTextWidthDefault);

            dfPersona.DataField        = dataDictionary[PersonaDataField];
            dfPersona.TableName        = dataDictionary[PersonaTableName];
            dfPersona.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dfPersona.LabelVisible     = true;
            dfPersona.Height           = UiConstants.TextboxHeight;
            dfPersona.TextContentWidth = UiConstants.TextBoxWidthDefault;
            dfPersona.OnChangedField  += changedField;
            dfPersona.ItemSource       = new DataTable();
            dfPersona.PrimaryKey       = "NUM_PROVEE";
            dfPersona.AllowedEmpty     = true;
            collection.Add(dfPersona);
            UiEmailDataField dfEmail = new UiEmailDataField();

            dfEmail.LabelText        = "Email";
            dfEmail.ButtonImage      = UiConstants.EmailImagePath;
            dfEmail.DataField        = dataDictionary[EmailDataField];
            dfEmail.TableName        = dataDictionary[EmailTableName];
            dfEmail.LabelTextWidth   = UiConstants.LabelTextWidthDefault;
            dfEmail.LabelVisible     = true;
            dfEmail.Height           = UiConstants.TextboxHeight;
            dfEmail.TextContentWidth = UiConstants.TextBoxWidthDefault;
            dfEmail.OnChangedField  += changedField;
            dfEmail.ItemSource       = new DataTable();
            dfEmail.PrimaryKey       = "NUM_PROVEE";
            dfEmail.AllowedEmpty     = true;
            collection.Add(dfEmail);
            return(collection);
        }