예제 #1
0
 private void btn_add_Click(object sender, EventArgs e)
 {
     PL.FRM_CAT_ADD frm_add = new FRM_CAT_ADD();
     frm_add.id           = 0;
     frm_add.btn_add.Text = "اضافة";
     frm_add.Show();
 }
예제 #2
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     PL.FRM_CAT_ADD frm_add = new FRM_CAT_ADD();
     frm_add.id           = 0;
     frm_add.btn_add.Text = "اضافة";
     frm_add.Show();
 }
예제 #3
0
        //edit
        private void btn_edit_Click(object sender, EventArgs e)
        {
            PL.FRM_CAT_ADD frm_add = new FRM_CAT_ADD();
            id     = Convert.ToInt32(tileView1.GetFocusedRowCellValue("ID"));
            tb_cat = db.TB_CAT.Where(x => x.ID == id).FirstOrDefault();
            frm_add.edt_name.Text   = tb_cat.CAT_Name.ToString();
            methods.by              = tb_cat.CAT_Cover;
            frm_add.pic_cover.Image = Image.FromStream(methods.convert_image());

            frm_add.id           = id;
            frm_add.btn_add.Text = "تعديل";
            frm_add.Show();
        }