Esempio n. 1
0
 private void tsbChinhSachGia_Click(object sender, EventArgs e)
 {
     try
     {
         if (gvListChungTu.FocusedRowHandle < 0)
         {
             return;
         }
         ChungTuBanHangChiTietBCInfor ct = (ChungTuBanHangChiTietBCInfor)gvListChungTu.GetRow(gvListChungTu.FocusedRowHandle);
         if (ct != null && ct.ListIdChinhSach != null && ct.ListIdChinhSach.Length > 2)
         {
             string lstIdDKMua = ct.ListIdChinhSach.Replace(";", ",");
             lstIdDKMua = lstIdDKMua.TrimStart(",".ToCharArray());
             lstIdDKMua = lstIdDKMua.TrimEnd(",".ToCharArray());
             List <BangGiaChinhSachInfor> liCSG = ChinhSachDataProvider.Instance.LoadChinhSachByIdDKMua(lstIdDKMua);
             if (liCSG.Count > 0)
             {
                 frmCS_List_ChinhSachKM_View frm = new frmCS_List_ChinhSachKM_View(liCSG[0], liCSG, true, null);
                 frm.Show();
                 frm.HideMenu();
             }
         }
         else
         {
             MessageBox.Show("Không có chính sách khuyến mại đi kèm");
         }
     }
     catch
     {
     }
     CommonFuns.Instance.ShowChinhSachKM(gvListChungTu);
 }
        private void btnDongBo_Click(object sender, EventArgs e)
        {
            frmCS_List_ChinhSachKM_View frm = new frmCS_List_ChinhSachKM_View(ChinhSach, liResult, true);

            //frm.HideMenu();
            frm.Show();
        }
 private void EditOrder(int rowHandle)
 {
     if (rowHandle < 0)
     {
         return;
     }
     ChinhSach = (BangGiaChinhSachInfor)gvChinhSach.GetRow(rowHandle);
     if (KieuTimKiem > 0 && ChinhSach != null)
     {
         this.DialogResult = DialogResult.OK;
     }
     else
     {
         this.DialogResult = DialogResult.None;
         frmCS_List_ChinhSachKM_View frm = new frmCS_List_ChinhSachKM_View(ChinhSach, liResult, true, this);
         //frm.HideMenu();
         frm.Show();
     }
 }