示例#1
0
 private void GLkp_PartName_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Plus)
     {
         using (var Frm = new Frm_CustomersSuppliers(Convert.ToInt32(Lkp_PartType.EditValue) == (int)Master.PartType.Customer))
         {
             Frm.ShowDialog();
             RefreshData();
         }
     }
 }
示例#2
0
        private void Dgv_DoubleClick(object sender, EventArgs e)
        {
            DXMouseEventArgs args = e as DXMouseEventArgs;
            GridView         view = sender as GridView;
            GridHitInfo      info = view.CalcHitInfo(args.Location);

            if (info.InRow || info.InRowCell)
            {
                Frm_CustomersSuppliers Frm = new Frm_CustomersSuppliers(Convert.ToInt32(view.GetFocusedRowCellValue(nameof(treasurys.id))));
                Frm.Show();
            }
        }
示例#3
0
        private void OpenForm(string Name)
        {
            Form Frm = null;

            switch (Name)
            {
            case "Frm_Suppliers":

                Frm = new Frm_CustomersSuppliers(false);
                break;

            case "Frm_Customers":

                Frm = new Frm_CustomersSuppliers(true);
                break;

            case "Frm_SuppliersList":
                Frm = new Frm_CustSupList(false);

                break;

            case "Frm_CustomersList":
                Frm = new Frm_CustSupList(true);
                break;

            case "Frm_PurchaseInvoice":
                Frm = new Frm_Invoices(Master.InvoiceType.Purshases);
                break;

            default:

                var Ins = Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(x => x.Name == Name);
                if (Ins != null)
                {
                    Frm = Activator.CreateInstance(Ins) as Form;
                    if (Application.OpenForms[Frm.Name] != null)
                    {
                        Frm = Application.OpenForms[Frm.Name];
                    }
                    else
                    {
                        Frm.Show();
                        //if (!fluentDesignFormContainer1.Controls.Contains(Frm))
                        //{
                        //    fluentDesignFormContainer1.Controls.Add(Frm);
                        //    Frm.Dock = DockStyle.Fill;
                        //    Frm.BringToFront();
                        //}
                        //Frm.BringToFront();
                    }
                    Frm.BringToFront();
                }
                break;
            }
            if (Frm != null)
            {
                Frm.Show();
            }
            //if (!fluentDesignFormContainer1.Controls.Contains(Frm))
            //{
            //    fluentDesignFormContainer1.Controls.Add(Frm);
            //    Frm.Dock = DockStyle.Fill;
            //    Frm.BringToFront();
            //}
            //Frm.BringToFront();
        }
示例#4
0
        public override void New()
        {
            Frm_CustomersSuppliers Frm = new Frm_CustomersSuppliers(IsCustomer);

            Frm.Show();
        }