コード例 #1
0
        private void addBarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            m_CurrentPoolID              = new ItemPool(m_ItemPoolSession);
            codeTextEdit.Text            = null;
            customerLookUpEdit.EditValue = null;
            customerLookUpEdit.Enabled   = true;
            descriptionMemoEdit.Text     = null;

            poolDetailsXpCollection.Criteria = new BinaryOperator(ItemPoolDetails.Fields.ItemPoolID, m_CurrentPoolID.Oid, BinaryOperatorType.Equal);
            poolDetailsXpCollection.Reload();

            if ((customerLookUpEdit.EditValue == null ? null : Convert.ToString(customerLookUpEdit.EditValue)) == customerLookUpEdit.Properties.NullText)
            {
                itemRepositoryItemLookUpEdit.DataSource = ItemsBLL.GetItemCodeAndIDsByTypesAndCustomerID(null, "RM", true, m_ItemPoolSession);
            }
            else
            {
                itemRepositoryItemLookUpEdit.DataSource = ItemsBLL.GetItemCodeAndIDsByTypesAndCustomerID((int?)customerLookUpEdit.EditValue, "RM", true, m_ItemPoolSession);
            }

            Utilities.MakeFormReadOnly(poolXtraTabPage, false);
            poolDetailsGridView.OptionsBehavior.Editable = true;
            poolSearchGridControl.Enabled = false;
            CheckPermissions();

            cancelBarButtonItem.Enabled = true;
            saveBarButtonItem.Enabled   = true;
            editBarButtonItem.Enabled   = false;
            addBarButtonItem.Enabled    = false;
            deleteBarButtonItem.Enabled = false;
            deleteGridColumn.Visible    = false;
        }
コード例 #2
0
        public void BindPoolControls(int poolID)
        {
            m_ItemPoolSession.DropIdentityMap();

            ItemPool pool = m_ItemPoolSession.GetObjectByKey <ItemPool>(poolID, true);

            m_CurrentPoolID              = pool;
            codeTextEdit.Text            = pool.PoolCode;
            customerLookUpEdit.EditValue = pool.PoolCustomerID.CustomerID;
            customerLookUpEdit.Enabled   = false;
            descriptionMemoEdit.Text     = pool.PoolDescription;

            poolDetailsXpCollection.Criteria = new BinaryOperator(ItemPoolDetails.Fields.ItemPoolID, m_CurrentPoolID.Oid, BinaryOperatorType.Equal);

            poolDetailsXpCollection.Reload();

            if ((customerLookUpEdit.EditValue == null ? null : Convert.ToString(customerLookUpEdit.EditValue)) == customerLookUpEdit.Properties.NullText)
            {
                itemRepositoryItemLookUpEdit.DataSource = ItemsBLL.GetItemCodeAndIDsByTypesAndCustomerID(null, "RM", true, m_ItemPoolSession);
            }
            else
            {
                itemRepositoryItemLookUpEdit.DataSource = ItemsBLL.GetItemCodeAndIDsByTypesAndCustomerID((int?)customerLookUpEdit.EditValue, "RM", true, m_ItemPoolSession);
            }
        }
コード例 #3
0
 private void customerLookUpEdit_EditValueChanged(object sender, EventArgs e)
 {
     if ((customerLookUpEdit.EditValue == null ? null : Convert.ToString(customerLookUpEdit.EditValue)) == customerLookUpEdit.Properties.NullText)
     {
         itemRepositoryItemLookUpEdit.DataSource = ItemsBLL.GetItemCodeAndIDsByTypesAndCustomerID(null, "RM", true, m_ItemPoolSession);
     }
     else
     {
         itemRepositoryItemLookUpEdit.DataSource = ItemsBLL.GetItemCodeAndIDsByTypesAndCustomerID((int?)customerLookUpEdit.EditValue, "RM", true, m_ItemPoolSession);
     }
 }