Exemplo n.º 1
0
        private void btnXnhan_Nhap_Click(object sender, EventArgs e)
        {
            //neu thay doi field KM(Per_Dongia) --> phai xac nhan nguoi thay doi co quyen hay khong
            GoobizFrame.Windows.Forms.Policy.Authorization.Actions Actions = GoobizFrame.Windows.MdiUtils.MdiChecker.ShowIDCardLogonWithResult(this);
            if (Actions.Count == 0 || !Actions.Contains("EnableHold"))
            {
                GoobizFrame.Windows.Forms.UserMessage.Show("ACCESS_DENIED", new string[] { });
                return;
            }
            else
            {
                lookUpEdit_Nhansu_Xnhan.EditValue = Convert.ToInt64(Actions.Id_Nhansu);
                var _Id_Winecard = gvBar_Winecard.GetFocusedRowCellValue("Id_Winecard");
                objBarService.Update_Bar_Winecard(new WebReferences.BarService.Bar_Winecard()
                {
                    Id_Winecard     = _Id_Winecard,
                    Ghichu          = memoGhichu.EditValue,
                    Id_Cuahang_Ban  = CurrentId_Cuahang_Ban,
                    Id_Hanghoa_Ban  = lookUpEditHanghoa_Ban.EditValue,
                    Id_Khachhang    = lookUpEditKhachhang.EditValue,
                    Id_Nhansu_Lap   = CurrentId_Nhansu,
                    Id_Nhansu_Xnhan = Convert.ToInt64(Actions.Id_Nhansu),
                    Ngay_Batdau     = dtNgay_Batdau.EditValue,
                    Ngay_Ketthuc    = dtNgay_Ketthuc.EditValue,
                    So_Chungtu      = txtSo_Chungtu.EditValue,
                });

                //in phieu
                Print(_Id_Winecard);
                DisplayInfo();
            }
        }
Exemplo n.º 2
0
        private void btnXnhan_Xuat_Click(object sender, EventArgs e)
        {
            GoobizFrame.Windows.Forms.Policy.Authorization.Actions Actions = GoobizFrame.Windows.MdiUtils.MdiChecker.ShowIDCardLogonWithResult(this);
            if (Actions.Count == 0 || !Actions.Contains("EnableReturn"))
            {
                GoobizFrame.Windows.Forms.UserMessage.Show("ACCESS_DENIED", new string[] { });
                return;
            }
            else
            {
                objBarService.Update_Bar_Winecard(new WebReferences.BarService.Bar_Winecard()
                {
                    Id_Winecard     = gvBar_Winecard.GetFocusedRowCellValue("Id_Winecard"),
                    Ghichu          = memoGhichu.EditValue,
                    Id_Cuahang_Ban  = CurrentId_Cuahang_Ban,
                    Id_Hanghoa_Ban  = lookUpEditHanghoa_Ban.EditValue,
                    Id_Khachhang    = lookUpEditKhachhang.EditValue,
                    Id_Nhansu_Lap   = CurrentId_Nhansu,
                    Id_Nhansu_Xnhan = ("" + lookUpEdit_Nhansu_Xnhan.EditValue != "") ? lookUpEdit_Nhansu_Xnhan.EditValue : null,
                    Ngay_Batdau     = dtNgay_Batdau.EditValue,
                    Ngay_Ketthuc    = dtNgay_Ketthuc.EditValue,
                    So_Chungtu      = txtSo_Chungtu.EditValue,

                    Id_Nhansu_Return = Actions.Id_Nhansu,
                    Ngay_Return      = objBarService.GetServerDateTime(),
                });

                DisplayInfo();
            }
        }
Exemplo n.º 3
0
 // chon ban cu de ghep
 void gridViewDm_Table_Old_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     DevExpress.XtraGrid.Views.Card.ViewInfo.CardHitInfo cardHit = gridViewDm_Table_Old.CalcHitInfo(e.X, e.Y);
     if (cardHit.InCard)
     {
         try
         {
             lblStatus_Bar.Text = "";
             DataRow drChons_Old2 = gridViewDm_Table_Old.GetDataRow(cardHit.RowHandle);
             identity_Old = drChons_Old2["Id_Table"];
             if (drChons_Old2["Id_Booking"] != null && drChons_Old2["Id_Booking"].ToString() != "")
             {
                 lblStatus_Bar.Text = "Bàn có booking, không được chọn bàn này để ghép";
                 return;
             }
             if (drChons_Old2["Lock"].ToString() != "")
             {
                 if ((bool)drChons_Old2["Lock"])
                 {
                     lblStatus_Bar.Text = "Bàn này đã in hóa đơn, liên hệ với quản lý để thay đổi";
                     GoobizFrame.Windows.Forms.Policy.Authorization.Actions Actions = GoobizFrame.Windows.MdiUtils.MdiChecker.ShowIDCardLogonWithResult(this);
                     if (Actions.Count == 0 || !Actions.Contains("EnableUnlock"))
                     {
                         lblStatus_Bar.Text = "Tài khoản không hợp lệ";
                         return;
                     }
                     else
                     {
                         lblStatus_Bar.Text = "";
                     }
                 }
             }
             if (dsTable_Order_Old_2.Tables[0].Rows.Count == 0)
             {
                 dsTable_Order_Old_2.Tables[0].ImportRow(gridViewDm_Table_Old.GetDataRow(cardHit.RowHandle));
                 if (drChons_New == null)
                 {
                     return;
                 }
                 performMerge(position);
             }
             else
             {
                 for (int i = 0; i < dsTable_Order_Old_2.Tables[0].Rows.Count; i++)
                 {
                     if (dsTable_Order_Old_2.Tables[0].Rows[i]["Id_Table_Order"].Equals(gridViewDm_Table_Old.GetDataRow(cardHit.RowHandle)["Id_Table_Order"]))
                     {
                         break;
                     }
                     if (i == dsTable_Order_Old_2.Tables[0].Rows.Count - 1)
                     {
                         dsTable_Order_Old_2.Tables[0].ImportRow(gridViewDm_Table_Old.GetDataRow(cardHit.RowHandle));
                         if (drChons_New == null)
                         {
                             return;
                         }
                         performMerge(position);
                     }
                 }
             }
         }
         catch (Exception ex) { GoobizFrame.Windows.TrayMessage.TrayMessage.Status = new GoobizFrame.Windows.TrayMessage.TrayMessageInfo(MessageBoxIcon.Asterisk, ex.Message, ex.ToString()); }
     }
 }