Ejemplo n.º 1
0
        private void dgv_mov_line_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                dgv_mov_line.CurrentRow.Cells["Product_ID"].Selected = true;
            }
            if (dgv_mov_line.CurrentCell == dgv_mov_line.CurrentRow.Cells["product_ID"] || dgv_mov_line.CurrentCell == dgv_mov_line.CurrentRow.Cells["A_N"] || dgv_mov_line.CurrentCell == dgv_mov_line.CurrentRow.Cells[0])
            {
                if (e.KeyCode == Keys.F9)
                {
                    Dictionary <int, string> list_C_N = new Dictionary <int, string>();
                    list_C_N.Add(50, "رقم المنتج");
                    list_C_N.Add(100, "اسم المنتج");



                    PL.Am.Form_Search frm = new Am.Form_Search("SELECT Product_ID ,A_N +'-'+Units_ID as A_N FROM INV_Products ", list_C_N);


                    frm.ShowDialog();
                    DataRow product_rows = DB.select_Row("INV_Products", "Product_ID", "'" + frm.dataGridView1.CurrentRow.Cells[0].Value.ToString() + "'");


                    if (product_rows != null)
                    {
                        dgv_mov_line.CurrentRow.Cells["product_ID"].Value   = product_rows["Product_ID"];
                        dgv_mov_line.CurrentRow.Cells["A_N"].Value          = product_rows["A_N"];
                        dgv_mov_line.CurrentRow.Cells["Product_disc"].Value = product_rows["Disc"];
                        dgv_mov_line.CurrentRow.Cells["Unit"].Value         = product_rows["Units_ID"];

                        dgv_mov_line.CurrentRow.Cells["Quantity"].Selected = true;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void txt_BANK_NO_id_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                view_data();
            }
            if (e.KeyCode == Keys.F9)
            {
                if (e.KeyCode == Keys.F9)
                {
                    Dictionary <int, string> list_C_N = new Dictionary <int, string>();
                    list_C_N.Add(50, "رقم البنك");
                    list_C_N.Add(100, "اسم البنك ");
                    list_C_N.Add(101, "الاسم الاجنبي ");

                    string sql = " SELECT  BANK_NO , BANK_NAME_A , BANK_NAME_E  FROM AC_CASH_AT_BANK ";

                    PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
                    frm.ShowDialog();

                    txt_BANK_NO_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                    view_data();
                }
            }
        }
Ejemplo n.º 3
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            // list_C_N.Add(50, "رقم امر التوريد");
            list_C_N.Add(49, "رقم الفرع");
            list_C_N.Add(100, "تارخ امر التوريد");
            list_C_N.Add(101, "المرجع");
            list_C_N.Add(48, "معلق");


            string sql      = "SELECT inst_num, [Branch_ID],[Instrument_Date],[refer_num],[stops] FROM AC_instrument ";
            string wherestr = " where inst_type = '3' and FYear=YEAR(getdate()) and ";
            string order_by = " order by Instrument_Date Desc ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
            //    frm.Size= new Size(140, 480);
            frm.ShowDialog();
            if (frm.dataGridView1.CurrentRow != null)
            {
                txt_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                view_data();
                frm_View(this);
            }
        }
Ejemplo n.º 4
0
 private void txt_Accout_ID_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9 && txt_Accout_ID.ReadOnly == false)
     {
         Dictionary <int, string> list_C_N = new Dictionary <int, string>();
         list_C_N.Add(50, "رقم الحساب");
         list_C_N.Add(150, "اسم الحساب ");
         list_C_N.Add(151, "الاسم الاجنبي");
         string            wherestr = BL.select_query.where_accoun_Show;
         string            sql      = BL.select_query.sql_account_search;
         PL.Am.Form_Search frm      = new Am.Form_Search(sql, wherestr, list_C_N);
         frm.ShowDialog();
         txt_Accout_ID.Text   = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
         txt_Account_A_N.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
         if (txt_Accout_ID.Text != string.Empty)
         {
             DataRow dr = Account.get_account(txt_Accout_ID);
             if (dr != null)
             {
                 txt_Account_A_N.Text        = dr["A_N"].ToString();
                 txt_Currency_key.Text       = dr["Currency_key"].ToString();
                 txt_curr_exch_rate.Text     = 1.ToString();
                 txt_curr_exch_rate_inv.Text = 1.ToString();
                 lb_curr_name.Text           = dr["currency_name"].ToString();
                 txt_curr_exch_rate.Text     = Convert.ToInt32(dr["curr_exch_rate"]).ToString();
             }
         }
     }
 }
Ejemplo n.º 5
0
        private void button3_Click(object sender, EventArgs e)
        {
            string sql = "SELECT  Account_ID as الرقم ,A_N as الاسم,E_N as الاسم_الاجنبي FROM [dbo].AC_Account where Type_id=1";

            PL.Am.Form_Search frm = new Am.Form_Search(sql);
            frm.MdiParent = this.MdiParent;


            frm.ShowDialog();
            txt_Account_ID.Text   = frm.dataGridView1.CurrentRow.Cells["الرقم"].Value.ToString();
            txt_Account_Nema.Text = frm.dataGridView1.CurrentRow.Cells["الاسم"].Value.ToString();
        }
Ejemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الحساب");
            list_C_N.Add(100, "اسم الحساب ");
            list_C_N.Add(101, "الاسم الاجنبي ");

            string wherestr = " where Type_ID = 2 and ";
            string sql      = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
            frm.ShowDialog();

            // txt_A_CODE.Text = proc.max_num_in_Column("AC_Account where Account_Parent_ID  = " + frm.dataGridView1.CurrentRow.Cells[0].Value.ToString(), "Account_ID");
            txt_A_CODE.Text    = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            txt_Cash_name.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();

            txt_A_CODE.ReadOnly = false;
            //  Account_ID = proc.max_num_in_Column("AC_Account", "Account_ID");
            //  MessageBox.Show("يرجا تحدد الحساب الرئسي ");
            txt_A_CODE.ReadOnly = true;
            btn_seve.Enabled    = true;

            //txt_CASH_NO_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();

            //  s = lb_full_accout_num.Text;
            frm.Dispose();

            try
            {
                if (txt_A_CODE.TextLength != 0)
                {
                    dal = new DAL.DataAccessLayer();
                    dgv_Cash_curr.DataSource       = dal.FindDataSet("select AM.currency_Key as الرمز,currency_name as الاسم,Ac.Used as استخدام from AC_Account_currency  AC right join AM_Currency AM  on ac.currency_Key=Am.currency_Key and Account_ID=N'" + txt_A_CODE.Text + "' where  AM.Used='1' ");
                    dgv_Cash_curr.Columns[0].Width = 30;
                    dgv_Cash_curr.Columns[0].Name  = "الرمز";
                    dgv_Cash_curr.Columns[1].Width = 70;
                    dgv_Cash_curr.Columns[1].Name  = "الاسم";
                    dgv_Cash_curr.Columns[2].Width = 60;
                    dgv_Cash_curr.Columns[2].Name  = "استخدام";
                }
                else
                {
                    dgv_Cash_curr.DataSource = null;
                }
            }
            catch (Exception)
            {
                return;
            }
        }
Ejemplo n.º 7
0
        private void search_data()
        {
            string sql = "SELECT Group_ID as الرقم ,A_N as الاسم,E_N as الاسم_الاجنبي FROM [dbo].AC_Account_Group ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql);
            frm.MdiParent = this.MdiParent;


            frm.ShowDialog();

            txt_id.Text = frm.dataGridView1.CurrentRow.Cells["الرقم"].Value.ToString();
            view_data();
        }
Ejemplo n.º 8
0
        private void btn_serch_Click(object sender, EventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "الرقم");
            list_C_N.Add(150, "الاسم ");
            list_C_N.Add(151, "الاسم الاجنبي");
            string sql = " SELECT top 20 date,A_ND ,E_ND FROM [dbo].AM_Date ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);

            frm.ShowDialog();
        }
Ejemplo n.º 9
0
        private void dgv_Units_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F9)
            {
                Dictionary <int, string> list_C_N = new Dictionary <int, string>();
                list_C_N.Add(50, "رمز الوحدة");
                list_C_N.Add(150, "اسم الوحدة ");

                string            wherestr = "where Units_ID <> N'" + cbx_Units.SelectedValue.ToString() + "' and ";
                string            sql      = " SELECT top 20 Units_ID ,A_N  FROM  [dbo].AM_Units ";
                PL.Am.Form_Search frm      = new Am.Form_Search(sql, wherestr, list_C_N);
                frm.ShowDialog();
                dgv_Units.CurrentRow.Cells["Units"].Value = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            }
        }
Ejemplo n.º 10
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم المجموعة");
            list_C_N.Add(150, "اسم المجموعة ");


            string sql = " SELECT top 20 [Category_ID],[A_N] FROM [dbo].[INV_Product_Category]  ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);

            frm.ShowDialog();
            txt_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            view_data();
        }
Ejemplo n.º 11
0
        private void btn_serch_Click(object sender, EventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الصندوق");
            list_C_N.Add(100, "اسم الصندوق ");
            list_C_N.Add(101, "الاسم الاجنبي ");

            string sql = " SELECT  CASH_NO , CASH_NAME , CASH_E_NAME  FROM AC_CASH_IN_HAND ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();

            txt_CASH_NO_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            view_data();
        }
Ejemplo n.º 12
0
 private void txt_cost_return_sales_Account_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9 && txt_salse_Account.ReadOnly == false && txt_A_N.Text != string.Empty)
     {
         Dictionary <int, string> list_C_N = new Dictionary <int, string>();
         list_C_N.Add(50, "رقم الحساب");
         list_C_N.Add(150, "اسم الحساب ");
         list_C_N.Add(151, "الاسم الاجنبي");
         string            wherestr = " where Type_ID=2 and ";
         string            sql      = " SELECT top 20 Account_ID,A_N ,E_N FROM [dbo].[AC_Account]  ";
         PL.Am.Form_Search frm      = new Am.Form_Search(sql, wherestr, list_C_N);
         frm.ShowDialog();
         txt_rerurn_sales_Account.Text   = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
         txt_rerurn_sales_Account_N.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
     }
 }
Ejemplo n.º 13
0
        private void search()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم المنتج");
            list_C_N.Add(100, "اسم المنتج");

            string sql = "SELECT Product_ID ,A_N +'-'+Units_ID as A_N FROM [dbo].INV_Products ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            //frm.textBox1.Text ="001-001";

            frm.ShowDialog();
            txt_id.Text = frm.dataGridView1.CurrentRow.Cells["Product_ID"].Value.ToString();
            view_data();
        }
Ejemplo n.º 14
0
 private void txt_V_CODE_to_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9)
     {
         Dictionary <int, string> list_C_N = new Dictionary <int, string>();
         list_C_N.Add(50, "رقم المورد");
         list_C_N.Add(100, "اسم المورد ");
         list_C_N.Add(101, "الاسم الاجنبي ");
         string            sql = " SELECT  V_CODE , V_A_NAME , V_E_NAME  FROM   V_DETAILS ";
         PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
         frm.ShowDialog();
         txt_V_CODE_to.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();;
         btn_seve.Enabled   = true;
         frm.Dispose();
     }
 }
Ejemplo n.º 15
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم النوع");
            list_C_N.Add(100, "اسم النوع ");
            list_C_N.Add(101, "الاسم الاجنبي ");


            //   string sql = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";
            string sql = "SELECT Type_ID ,A_N,E_N  FROM [dbo].AM_Product_Type ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            frm.Dispose();
        }
Ejemplo n.º 16
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الحساب");
            list_C_N.Add(100, "اسم الحساب ");
            list_C_N.Add(101, "الاسم الاجنبي ");

            string wherestr = " where Type_ID = 2 and ";
            string sql      = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
            frm.ShowDialog();

            txt_A_CODE.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
        }
Ejemplo n.º 17
0
        private void txt_id_to_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F9)
            {
                Dictionary <int, string> list_C_N = new Dictionary <int, string>();
                list_C_N.Add(50, "رقم الحساب");
                list_C_N.Add(100, "اسم الحساب ");

                string            sql = " SELECT  Account_ID , A_N   FROM   AC_Account_LMT ";
                PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
                frm.ShowDialog();
                txt_id_to.Text          = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                txt_Account_ID.ReadOnly = true;
                btn_seve.Enabled        = true;
                frm.Dispose();
            }
        }
Ejemplo n.º 18
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الدولة");
            list_C_N.Add(100, "اسم الدولة");
            list_C_N.Add(101, "الاسم الاجنبي");


            //   string sql = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";
            string sql = "SELECT  Country_ID,Country_A_N,Country_E_N from [AM_Country]";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            cbx_ID.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            frm.Dispose();
        }
Ejemplo n.º 19
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم العملة");
            list_C_N.Add(100, "اسم العملة");
            list_C_N.Add(101, "الاسم الاجنبي");


            //   string sql = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";
            string sql = " SELECT currency_ID , currency_name_e , currency_name FROM AM_Currency ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            txt_currenccy_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            frm.Dispose();
        }
Ejemplo n.º 20
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الفرع");
            list_C_N.Add(100, "اسم الفرع");
            list_C_N.Add(101, "الاسم الاجنبي");


            //string sql = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";

            string sql = "SELECT  [Branch_ID],[Branch_A_N] ,[Branch_E_N] FROM [AM_Branches]";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            txt_branch_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            frm.Dispose();
        }
Ejemplo n.º 21
0
        private void search_data()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم المدينة");
            list_C_N.Add(100, "اسم المدينة");
            list_C_N.Add(101, "الاسم الاجنبي");


            //   string sql = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";
            string sql = " SELECT  Distinct_id , A_N , E_N from AM_Districts ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            txt_id.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            frm.Dispose();
            view_data();
        }
Ejemplo n.º 22
0
        private void search()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الحساب");
            list_C_N.Add(100, "اسم الحساب ");
            list_C_N.Add(101, "الاسم الاجنبي ");

            string wherestr = " where Type_ID = 2 and ";
            string sql      = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
            frm.ShowDialog();


            txt_A_CODE.Text       = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            txt_AC_Bank_Name.Text = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            txt_A_CODE.ReadOnly   = true;
            btn_seve.Enabled      = true;
            frm.Dispose();

            try
            {
                if (txt_A_CODE.TextLength != 0)
                {
                    dal = new DAL.DataAccessLayer();
                    dgv_BANK_curr.DataSource       = dal.FindDataSet("select AM.currency_Key as الرمز,currency_name as الاسم,Ac.Used as استخدام from AC_Account_currency  AC right join AM_Currency AM  on ac.currency_Key=Am.currency_Key and Account_ID=N'" + txt_A_CODE.Text + "' where  AM.Used='1' ");
                    dgv_BANK_curr.Columns[0].Width = 30;
                    dgv_BANK_curr.Columns[0].Name  = "الرمز";
                    dgv_BANK_curr.Columns[1].Width = 70;
                    dgv_BANK_curr.Columns[1].Name  = "الاسم";
                    dgv_BANK_curr.Columns[2].Width = 60;
                    dgv_BANK_curr.Columns[2].Name  = "استخدام";
                }
                else
                {
                    dgv_BANK_curr.DataSource = null;
                }
            }
            catch (Exception)
            {
                return;
            }
        }
Ejemplo n.º 23
0
        private void button2_Click(object sender, EventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الحساب");
            list_C_N.Add(100, "اسم الحساب ");
            list_C_N.Add(101, "الاسم الاجنبي ");

            string wherestr = " where Type_id=1 and ";
            string sql      = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
            frm.ShowDialog();



            //  s = lb_full_accout_num.Text;
            frm.Dispose();
        }
Ejemplo n.º 24
0
        private void btn_serch_Click(object sender, EventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم المورد");
            list_C_N.Add(100, "اسم المورد ");
            list_C_N.Add(101, "الاسم الاجنبي ");
            string sql = " SELECT V_DEGREE , V_DEGREE_A_NAME , V_DEGREE_E_NAME from IAS_VENDOR_DEGREE  ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            txt_V_DEGREE.Text    = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            txt_A_N.Text         = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            txt_E_N.Text         = frm.dataGridView1.CurrentRow.Cells[2].Value.ToString();
            btn_edit.Enabled     = true;
            btn_seve.Enabled     = false;
            txt_V_DEGREE.Enabled = false;
            frm.Dispose();
        }
Ejemplo n.º 25
0
        private void btn_search_Click(object sender, EventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الحساب");
            list_C_N.Add(100, "اسم الحساب");
            list_C_N.Add(101, "الاسم الاجنبي");

            string wherestr = " where Type_ID = 2 and ";
            string sql      = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
            frm.ShowDialog();
            txt_Account_ID.Text     = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            txt_A_N.Text            = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            txt_Account_ID.ReadOnly = true;
            btn_seve.Enabled        = true;
            frm.Dispose();
        }
Ejemplo n.º 26
0
        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F9)
            {
                Dictionary <int, string> list_C_N = new Dictionary <int, string>();
                list_C_N.Add(50, "رقم الحساب");
                list_C_N.Add(100, "اسم الحساب");
                list_C_N.Add(101, "الاسم الاجنبي");

                string wherestr = " where Type_ID = 2 and ";
                string sql      = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account ";

                PL.Am.Form_Search frm = new Am.Form_Search(sql, wherestr, list_C_N);
                frm.ShowDialog();
                txt_V_ACCOUNT_ID.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                btn_seve.Enabled      = true;
                frm.Dispose();
            }
        }
Ejemplo n.º 27
0
        private void txt_PR_TYPE_KeyDown(object sender, KeyEventArgs e)
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم الطلب");
            list_C_N.Add(100, "اسم الطلب");
            list_C_N.Add(101, "الاسم الاجنبي");
            string sql = " select PR_TYPE , PR_A_NAME ,PR_E_NAME  from IAS_PREQ_TYPES ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();
            txt_PR_TYPE.Text    = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            txt_A_N.Text        = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            txt_E_N.Text        = frm.dataGridView1.CurrentRow.Cells[2].Value.ToString();
            btn_edit.Enabled    = true;
            btn_seve.Enabled    = false;
            txt_PR_TYPE.Enabled = false;
            frm.Dispose();
        }
Ejemplo n.º 28
0
        private void search()
        {
            Dictionary <int, string> list_C_N = new Dictionary <int, string>();

            list_C_N.Add(50, "رقم المورد");
            list_C_N.Add(100, "اسم المورد ");
            list_C_N.Add(101, "الاسم الاجنبي ");


            string sql = " SELECT  V_CODE , V_A_NAME , V_E_NAME  FROM   V_DETAILS ";

            PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
            frm.ShowDialog();

            txt_V_CODE.Text = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            view_data();
            txt_V_CODE.ReadOnly = true;
            btn_seve.Enabled    = true;
            frm.Dispose();
        }
Ejemplo n.º 29
0
 private void txt_V_CLASS_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9)
     {
         Dictionary <int, string> list_C_N = new Dictionary <int, string>();
         list_C_N.Add(50, "رقم المورد");
         list_C_N.Add(100, "اسم المورد ");
         list_C_N.Add(101, "الاسم الاجنبي ");
         string            sql = " SELECT V_CLASS , V_CLASS_NAME , V_CLASS_E_NAME from SUP_VENDOR_CLASS  ";
         PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
         frm.ShowDialog();
         txt_V_CLASS.Text    = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
         txt_A_N.Text        = frm.dataGridView1.CurrentRow.Cells[1].Value.ToString();
         txt_E_N.Text        = frm.dataGridView1.CurrentRow.Cells[2].Value.ToString();
         btn_edit.Enabled    = true;
         btn_seve.Enabled    = false;
         txt_V_CLASS.Enabled = false;
         frm.Dispose();
     }
 }
Ejemplo n.º 30
0
        private void cbx_ID_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F9)
            {
                Dictionary <int, string> list_C_N = new Dictionary <int, string>();
                list_C_N.Add(50, "رقم الدولة");
                list_C_N.Add(100, "اسم الدولة");
                list_C_N.Add(101, "الاسم الاجنبي");


                //   string sql = " SELECT  Account_ID ,A_N ,E_N  FROM   AC_Account";
                string            sql = "SELECT  Country_ID,Country_A_N,Country_E_N from [AM_Country]";
                PL.Am.Form_Search frm = new Am.Form_Search(sql, list_C_N);
                frm.ShowDialog();
                cbx_ID.Text          = frm.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                cbx_currency.Enabled = true;
                frm.Dispose();
                view_data();
            }
        }