Beispiel #1
0
 private bool DoEditPriceList(long Currency_ID,NavigationButtons.Navigation xnav, ref string Err)
 {
     Form_PriceList_Edit PriceListType_Edit_dlg = null;
     NavigationButtons.Navigation nav_Form_PriceList_Edit = null;
     if (xnav == null)
     {
         nav_Form_PriceList_Edit = new NavigationButtons.Navigation();
         nav_Form_PriceList_Edit.bDoModal = true;
         nav_Form_PriceList_Edit.m_eButtons = NavigationButtons.Navigation.eButtons.OkCancel;
         PriceListType_Edit_dlg = new Form_PriceList_Edit(false, m_eShopType, nav_Form_PriceList_Edit);
         nav_Form_PriceList_Edit.ChildDialog = PriceListType_Edit_dlg;
     }
     else
     {
         nav_Form_PriceList_Edit = xnav;
         if (nav_Form_PriceList_Edit.m_eButtons == NavigationButtons.Navigation.eButtons.OkCancel)
         {
             nav_Form_PriceList_Edit.bDoModal = true;
         }
         PriceListType_Edit_dlg = new Form_PriceList_Edit(false, m_eShopType, nav_Form_PriceList_Edit);
         xnav.ChildDialog = PriceListType_Edit_dlg;
     }
     nav_Form_PriceList_Edit.ShowDialog();
     if ((nav_Form_PriceList_Edit.eExitResult == NavigationButtons.Navigation.eEvent.OK) || (nav_Form_PriceList_Edit.eExitResult == NavigationButtons.Navigation.eEvent.NEXT))
     {
         if (m_xPriceList.Get_PriceLists_of_Currency(Currency_ID, ref xPriceList_Count, ref Err))
         {
             if (xPriceList_Count > 0)
             {
                 this.cmb_PriceListType.DataSource = m_xPriceList.List_xPriceList;
                 this.cmb_PriceListType.DisplayMember = "xPriceList_Name";
                 this.cmb_PriceListType.ValueMember = "xPriceList_ID";
             }
         }
         else
         {
             LogFile.Error.Show(Err);
             return false;
         }
     }
     else if (nav_Form_PriceList_Edit.eExitResult == NavigationButtons.Navigation.eEvent.PREV)
     {
         return true;
     }
     else
     {
         return false;
     }
     return true;
 }
Beispiel #2
0
 public void PriceList_Edit(bool bEditUndefined,NavigationButtons.Navigation xnav)
 {
     string Err = null;
     int xPriceListType_Count = 0;
     Form_PriceList_Edit PriceList_Edit_dlg = new Form_PriceList_Edit(bEditUndefined, m_eShopType, xnav);
     if (PriceList_Edit_dlg.ShowDialog() == DialogResult.OK)
     {
         if (m_xPriceList.Get_PriceLists_of_Currency(m_Currency_ID, ref xPriceListType_Count, ref Err))
         {
             if (xPriceListType_Count > 0)
             {
                 cmb_PriceListType.DataSource = m_xPriceList.List_xPriceList;
                 cmb_PriceListType.DisplayMember = "xPriceList_Name";
                 cmb_PriceListType.ValueMember = "xPriceList_ID";
             }
         }
         else
         {
             LogFile.Error.Show(Err);
         }
     }
 }