Beispiel #1
0
        private void DGV_ACC_St_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != DGV.Columns["Ref_No"].Index && DGV.CurrentRow.Cells["Jor_ID"].Value.ToString() != "")
            {
                Jor = new Bills.FRM_Jor(Main);
                string t = DGV.CurrentRow.Cells["Jor_ID"].Value.ToString();
                Jor.combo_Bill_Branches.SelectedValue = t.Substring(0, 3);
                Jor.ChangetxtSearch(t.Substring(4));
                Jor.FormBorderStyle = FormBorderStyle.Sizable;
                Jor.StartPosition   = (WindowState == FormWindowState.Maximized)?FormStartPosition.CenterScreen : FormStartPosition.Manual;
                Jor.Location        = (Parent == null) ? new Point(Location.X - 40, Location.Y + 45) : Jor.Location;
                Jor.Height          = 700;
                Jor.Width           = 975;

                Jor.Visible = false;
                Jor.ShowDialog();
            }
            else if (e.ColumnIndex == DGV.Columns["Ref_No"].Index)
            {
                if (DGV.Rows[e.RowIndex].Cells["Ref_Type"].Value.ToString() == "رصيد إفتتاحي")
                {
                    Open = new Bills.FRM_Open(Main);
                    string t = DGV.CurrentRow.Cells["Ref_No"].Value.ToString();
                    Open.ChangetxtSearch(t.Substring(4));
                }
                else if (DGV.Rows[e.RowIndex].Cells["Ref_Type"].Value.ToString() == "تحويل")
                {
                    Tran = new Bills.FRM_Tran(Main);
                    string t = DGV.CurrentRow.Cells["Ref_No"].Value.ToString();
                    Tran.ChangetxtSearch(t.Substring(4));
                }
                else if (DGV.Rows[e.RowIndex].Cells["Ref_Type"].Value.ToString() == "إستلام مشتريات")
                {
                    Pur = new Bills.FRM_Pur(Main);
                    string t = DGV.CurrentRow.Cells["Ref_No"].Value.ToString();
                    Pur.ChangetxtSearch(t.Substring(4));
                }
                else if (DGV.Rows[e.RowIndex].Cells["Ref_Type"].Value.ToString() == "فاتورة بيع")
                {
                    Sal = new Bills.FRM_Sal(Main);
                    string t = DGV.CurrentRow.Cells["Ref_No"].Value.ToString();
                    Sal.ChangetxtSearch(t.Substring(4));
                    Sal.Show();
                }
                else if (DGV.Rows[e.RowIndex].Cells["Ref_Type"].Value.ToString() == "سند قبض")
                {
                    Money_In = new Bills.FRM_Money_In(Main);
                    string t = DGV.CurrentRow.Cells["Ref_No"].Value.ToString();
                    Money_In.ChangetxtSearch(t.Substring(4));
                }
                else if (DGV.Rows[e.RowIndex].Cells["Ref_Type"].Value.ToString() == "سند صرف")
                {
                    Money_Out = new Bills.FRM_Money_Out(Main);
                    string t = DGV.CurrentRow.Cells["Ref_No"].Value.ToString();
                    Money_Out.ChangetxtSearch(t.Substring(4));
                    Money_Out.Show();
                }
            }
        }
Beispiel #2
0
        private void btn_Open_Click(object sender, EventArgs e)
        {
            Opening_Balance_Form = new Bills.FRM_Open(this);

            if (Opening_Balance_Form_Open == true)
            {
                tabForms.SelectTab("Opening_Balance");
                return;
            }

            Opening_Balance_Form.TopLevel = false;
            TabPage t = new TabPage();

            tabForms.TabPages.Add(t);
            t.Controls.Add(Opening_Balance_Form);
            t.Text = "" + btn_Open.Text + "";

            tabForms.SelectedTab      = t;
            tabForms.SelectedTab.Name = "Opening_Balance";

            Opening_Balance_Form_Open = true;
            Opening_Balance_Form.Show();
        }