예제 #1
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            FRM_PUR_ADD frm_pur_add = new FRM_PUR_ADD();

            id     = Convert.ToInt32(gridView1.GetFocusedRowCellValue("ID_PUR"));
            tb_pur = dbs.TB_PUR.Where(x => x.ID_PUR == id).FirstOrDefault();

            frm_pur_add.txt_name.Text = tb_pur.PUR_NAME;
            frm_pur_add.txt_name.Text = tb_pur.PUR_NAME;
            frm_pur_add.txt_type.Text = tb_pur.PUR_TYPE;
            frm_pur_add.add_cat.Text  = tb_pur.PUR_CAT;
            frm_pur_add.add_supp.Text = tb_pur.PUR_SUPP;
            frm_pur_add.txt_det.Text  = tb_pur.PUR_DET;

            frm_pur_add.txt_buy.Text  = tb_pur.PUR_BUY.ToString();
            frm_pur_add.txt_sell.Text = tb_pur.PUR_SELL.ToString();
            frm_pur_add.txt_qt.Text   = tb_pur.PUR_QT.ToString();
            frm_pur_add.t_buy.Text    = tb_pur.PUR_Tbuy.ToString();
            frm_pur_add.t_sell.Text   = tb_pur.PUR_Tsell.ToString();
            frm_pur_add.t_all.Text    = tb_pur.PUR_TRev.ToString();

            frm_pur_add.id           = id;
            frm_pur_add.btn_add.Text = "التعديل";
            frm_pur_add.Show();
        }
 private void btn_add_cat_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PL.FRM_PUR_ADD frm_pur_add = new FRM_PUR_ADD();
     frm_pur_add.id           = 0;
     frm_pur_add.btn_add.Text = "اضافة";
     frm_pur_add.Show();
 }
예제 #3
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            FRM_PUR_ADD frm_pur_add = new FRM_PUR_ADD();

            frm_pur_add.id           = 0;
            frm_pur_add.btn_add.Text = "اضافة";
            frm_pur_add.Show();
        }