Ejemplo n.º 1
0
        private void WarehouseList_gridView_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            try
            {
                WarehouseList warehouseList = this.WarehouseList_gridView.GetRow(e.RowHandle).CastTo <WarehouseList>();

                this.WarehouseListCode_textEdit.EditValue = warehouseList.WarehouseListID;
                this.WarehouseListName_textEdit.Text      = warehouseList.WarehouseListName;
                this.WarehouseListDebitAccount_searchLookUpEdit.EditValue        = warehouseList.WarehouseListDebitAccountID;
                this.WarehouseListDebitAccountDetail_searchLookUpEdit.EditValue  = warehouseList.WarehouseListDebitAccountDetailID;
                this.WarehouseListCreditAccount_searchLookUpEdit.EditValue       = warehouseList.WarehouseListCreditAccountID;
                this.WarehouseListCreditAccountDetail_searchLookUpEdit.EditValue = warehouseList.WarehouseListCreditAccountDetailID;
                this.WarehouseListManageCode_searchLookUpEdit.EditValue          = warehouseList.WarehouseListManageCode ?? "";
                this.WarehouseListNote_richTextBoxVoucherContent.Text            = warehouseList.WarehouseListNote ?? "";
                this.WarehouseListAdd_textEdit.Text   = warehouseList.WarehouseListAddress ?? "";
                this.WarehouseListTitle_textEdit.Text = warehouseList.WarehouseListTitle ?? "";

                // this.WarehouseListDebitAccountDetail_searchLookUpEdit.EditValue = selectRow.AccountDetailID;
                materialDebitAccountDetail = materialTK.Where(item => item.AccountID == WarehouseListDebitAccount_searchLookUpEdit.EditValue.ToString()).ToList();
                this.WarehouseListDebitAccountDetail_searchLookUpEdit.Properties.DataSource = materialDebitAccountDetail;
                WarehouseListDebitAccountDetail_searchLookUpEdit.Refresh();

                materialCreditAccountDetail = materialTK.Where(item => item.AccountID == WarehouseListCreditAccount_searchLookUpEdit.EditValue.ToString()).ToList();
                this.WarehouseListCreditAccountDetail_searchLookUpEdit.Properties.DataSource = materialCreditAccountDetail;
                WarehouseListCreditAccountDetail_searchLookUpEdit.Refresh();
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        private void WarehouseListCreditAccount_searchLookUpEdit_EditValueChanged(object sender, EventArgs e)
        {
            var selectRow = ((SearchLookUpEdit)sender).Properties.View.GetFocusedRow().CastTo <MaterialTK>();

            if (selectRow != null)
            {
                this.WarehouseListCreditAccountDetail_searchLookUpEdit.EditValue = selectRow.AccountDetailID;
                materialCreditAccountDetail = materialTK.Where(item => item.AccountID == WarehouseListCreditAccount_searchLookUpEdit.EditValue.ToString()).ToList();
                this.WarehouseListCreditAccountDetail_searchLookUpEdit.Properties.DataSource = materialCreditAccountDetail;
                WarehouseListCreditAccountDetail_searchLookUpEdit.Refresh();
            }
        }