コード例 #1
0
ファイル: PageParties.cs プロジェクト: rupeshaveva/ExcelERP
        private void btnAddNewCustomer_Click(object sender, EventArgs e)
        {
            frmParty frm = new frmParty(this.SelectedPartyType);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                PopulateParties();
            }
        }
コード例 #2
0
        private void Popup_Showdialog(object sender, EventArgs e)
        {
            string tagname = Convert.ToString((sender as ToolStripMenuItem).Tag);

            if (tagname == "")
            {
                return;
            }
            Form winform = new Form();

            switch (tagname)
            {
            //master
            case "Add Party": winform = new frmParty(); break;

            case "Add Challan": winform = new frmEntryChallan(); break;

            case "Add Bill": winform = new frmEntryBills(); break;

            case "Add LR Note": winform = new frmEntryLRNote(); break;

            case "Add MR Note": winform = new frmEntryMRNote(); break;

            case "Add Account": winform = new frmEntryAccount(); break;

            case "Add Transaction": winform = new frmEntryTransaction(); break;

            case "Bill Report": winform = (Form) new BRCTransport.Window.Report.BillReport(); break;
            }


            bool flag = false;

            foreach (Form form in Application.OpenForms)
            {
                if (tagname == Convert.ToString(form.Tag))
                {
                    flag = true;
                    form.Focus();
                    break;
                }
                flag = false;
            }

            if (flag == false)
            {
                winform.ShowInTaskbar = false;
                //  winform.MdiParent = this;
                winform.StartPosition = FormStartPosition.CenterScreen;
                winform.Text          = tagname;
                // winform.WindowState = FormWindowState.Maximized;
                winform.ShowDialog();
                winform = null;
            }
        }
コード例 #3
0
ファイル: PageParties.cs プロジェクト: rupeshaveva/ExcelERP
 private void btnEditCustomers_Click(object sender, EventArgs e)
 {
     try
     {
         frmParty frm = new frmParty(this.SelectedPartyID);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateParties();
         }
     }
     catch (Exception ex)
     {
         string strErr = ex.Message;
         if (ex.InnerException != null)
         {
             strErr += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(strErr, "pageParties::btnEditCustomers_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #4
0
 private void btnAddNewSiteClient_Click(object sender, EventArgs e)
 {
     try
     {
         frmParty frm = new frmParty("C");
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateSiteClients();
             cboSiteClient.SelectedItem = ((List <SelectListItem>)cboSiteClient.DataSource).Where(x => x.ID == frm.SelectedID).FirstOrDefault();
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "frmAddEditProject::btnAddNewSiteClient_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }