//獲取系統信息 public ActionResult GetSystemMessage(string ID) { var result = BaseDataDAL.GetSystemMessage(ID); //var result = new { rows = list }; return(Json(result, JsonRequestBehavior.AllowGet)); }
protected static string CheckQtyStore(string LocID, string GoodsID, string ProdcutMo, string LotNo, string flag1, decimal Weg, decimal Qty) { string result = ""; decimal InQty = 0, InWeg = 0, OutQty = 0, OutWeg = 0; DataTable dtStore1 = GetStoreDetails(LocID, GoodsID, ProdcutMo, LotNo); if (dtStore1.Rows.Count > 0) { InWeg = dtStore1.Rows[0]["InWeg"].ToString() != "" ? Convert.ToDecimal(dtStore1.Rows[0]["InWeg"].ToString()) : 0; InQty = dtStore1.Rows[0]["InQty"].ToString() != "" ? Convert.ToDecimal(dtStore1.Rows[0]["InQty"].ToString()) : 0; OutWeg = dtStore1.Rows[0]["OutWeg"].ToString() != "" ? Convert.ToDecimal(dtStore1.Rows[0]["OutWeg"].ToString()) : 0; OutQty = dtStore1.Rows[0]["OutQty"].ToString() != "" ? Convert.ToDecimal(dtStore1.Rows[0]["OutQty"].ToString()) : 0; } if (flag1 == "+") { if (InWeg + Weg < OutWeg || InWeg + Weg < 0) { result = BaseDataDAL.GetSystemMessage("ST00002"); } else if (InQty + Qty < OutQty || InQty + Qty < 0) { result = BaseDataDAL.GetSystemMessage("ST00001"); } } else { if (dtStore1.Rows.Count == 0) { result = BaseDataDAL.GetSystemMessage("ST00003"); } else if (OutWeg + Weg > InWeg || OutWeg + Weg < 0) { result = BaseDataDAL.GetSystemMessage("ST00002"); } else if (OutQty + Qty > InQty || OutQty + Qty < 0) { result = BaseDataDAL.GetSystemMessage("ST00001"); } } return(result); }