예제 #1
0
        /// <summary>
        /// edit an existing supplier
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void EditDetails(object sender, EventArgs e)
        {
            Int64 PartnerKey = GetCurrentlySelectedSupplier();

            if (PartnerKey != -1)
            {
                this.Cursor = Cursors.WaitCursor;
                TFrmAPEditSupplier frm = new TFrmAPEditSupplier(FMainForm);
                frm.LedgerNumber = FMainForm.LedgerNumber;
                frm.EditSupplier(PartnerKey);
                this.Cursor = Cursors.Default;

                frm.Show();
            }
        }
예제 #2
0
        /// <summary>
        /// create a new supplier
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void NewSupplier(object sender, EventArgs e)
        {
            Int64         PartnerKey = -1;
            String        ResultStringLbl;
            TPartnerClass?PartnerClass;
            TLocationPK   ResultLocationPK;

            // the user has to select an existing partner to make that partner a supplier
            if (TPartnerFindScreenManager.OpenModalForm("",
                                                        TPartnerClass.ORGANISATION,
                                                        out PartnerKey,
                                                        out ResultStringLbl,
                                                        out PartnerClass,
                                                        out ResultLocationPK,
                                                        FMainForm))
            {
                TFrmAPEditSupplier frm = new TFrmAPEditSupplier(FMainForm);
                frm.LedgerNumber = FMainForm.LedgerNumber;
                frm.CreateNewSupplier(PartnerKey);
                frm.Show();
            }
        }
        /// <summary>
        /// edit an existing supplier
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void EditDetails(object sender, EventArgs e)
        {
            Int64 PartnerKey = GetCurrentlySelectedSupplier();

            if (PartnerKey != -1)
            {
                this.Cursor = Cursors.WaitCursor;
                TFrmAPEditSupplier frm = new TFrmAPEditSupplier(FMainForm);
                frm.LedgerNumber = FMainForm.LedgerNumber;
                frm.EditSupplier(PartnerKey);
                this.Cursor = Cursors.Default;

                frm.Show();
            }
        }
        /// <summary>
        /// create a new supplier
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void NewSupplier(object sender, EventArgs e)
        {
            Int64 PartnerKey = -1;
            String ResultStringLbl;
            TPartnerClass? PartnerClass;
            TLocationPK ResultLocationPK;

            // the user has to select an existing partner to make that partner a supplier
            if (TPartnerFindScreenManager.OpenModalForm("",
                    TPartnerClass.ORGANISATION,
                    out PartnerKey,
                    out ResultStringLbl,
                    out PartnerClass,
                    out ResultLocationPK,
                    FMainForm))
            {
                TFrmAPEditSupplier frm = new TFrmAPEditSupplier(FMainForm);
                frm.LedgerNumber = FMainForm.LedgerNumber;
                frm.CreateNewSupplier(PartnerKey);
                frm.Show();
            }
        }