Ejemplo n.º 1
0
        public JsonResult UpdateCheckStatus(Int32 checkId, CommonUnit.CheckType type, CommonUnit.CheckStatus status, Decimal adjustment, Int32 split)
        {
            CheckPrint model;

            try {
                if (status == CommonUnit.CheckStatus.Paid)
                {
                    model = GetCheckPrintModel(checkId, type.ToString(), split, adjustment);
                    if (model != null)
                    {
                        _orderService.UpdateCheckStatusPaid(checkId, model.Summary, model.Tax, model.Adjustment);
                    }
                }
                else
                {
                    _orderService.UpdateCheckStatus(checkId, status);
                }
            }
            catch (Exception ex) {
                base.Log(ex);
            }
            finally {
            }

            var retVal = new {
            };

            return(Json(retVal));
        }
Ejemplo n.º 2
0
        public JsonResult UpdateCheckType(Int32 checkId, CommonUnit.CheckType type)
        {
            try {
                _orderService.UpdateCheckType(checkId, type);
            }
            catch (Exception ex) {
                base.Log(ex);
            }
            finally {
            }

            var retVal = new {
            };

            return(Json(retVal));
        }
Ejemplo n.º 3
0
        public Boolean UpdateCheckType(Int32 checkId, CommonUnit.CheckType type)
        {
            Check query = new Check();

            if (checkId != 0)
            {
                using (menuzRusDataContext db = new menuzRusDataContext(base.connectionString)) {
                    query = db.Checks.FirstOrDefault(m => m.id == checkId);
                    if (query != default(Check))
                    {
                        query.Type = (Int32)type;
                        db.SubmitChanges();
                        return(true);
                    }
                }
            }
            return(false);
        }