Beispiel #1
0
 public void tsbtpxhmtl(string a, Form1 F, DevExpress.XtraGrid.Views.Grid.GridView view, string roleid, string subsys, string ngaychungtu, string userid, string branchid, DataTable khach, DataTable hang)
 {
     try
     {
         Frm_phieuxuathangmuatralai u = new Frm_phieuxuathangmuatralai();
         u.myac = new Frm_phieuxuathangmuatralai.ac(F.refreshpxhmtl);
         u.getactive(a);
         u.getroleid(roleid);
         u.getsub(subsys);
         u.gethang(hang);
         u.getkhach(khach);
         u.getpt("pxtl");
         u.getbranch(branchid);
         u.getuser(userid);
         u.getdate(ngaychungtu);
         try
         {
             if (a == "1")
             {
                 u.getrole(view.GetRowCellValue(view.FocusedRowHandle, "ID").ToString());
             }
             else
             {
                 try
                 {
                     u.getrole(view.GetRowCellValue(view.FocusedRowHandle, "Mã kho").ToString());
                 }
                 catch
                 {
                     u.getrole(gen.GetString("select Top 1 StockCode from Stock where StockID in (select StockID from MSC_UserJoinStock where UserID='" + userid + "') order by StockCode"));
                 }
             }
         }
         catch { }
         u.ShowDialog();
     }
     catch { MessageBox.Show("Vui lòng chọn phiếu nhập hàng bán trả lại trước khi sửa."); }
 }