public string UpdateFavoriteStockMemo(stockFavorite favorite) { bool status = reportModel.updateFavoriteStockMemo(favorite); string msg = status ? "自行備註編輯成功" : "自行備註編輯失敗"; return(msg); }
public JsonResult EditStockFavorite(stockFavorite form) { bool status = true; bool check = true; string msg = ""; if (form.id == 0) { check = false; } if (check) { status = reportModel.updateFavoriteStockMemo(form); msg = status ? "更新成功!" : "更新失敗!"; } else { status = false; msg = "資料輸入錯誤!"; } return(Json(new Results <DBNull> { Success = status, Message = msg, Data = null, TotalCount = status ? 1 : 0 })); }
public JsonResult DeleteStockInventory(stockFavorite form) { bool status = true; bool check = true; string msg = ""; if (form.id == 0) { check = false; } if (check) { status = reportModel.deleteStockInventory(form.id); msg = status ? "刪除成功!" : "刪除失敗!"; } else { status = false; msg = "資料輸入錯誤!"; } return(Json(new Results <DBNull> { Success = status, Message = msg, Data = null, TotalCount = status ? 1 : 0 })); }
public JsonResult CreateStockFavorite(stockFavorite form) { bool status = true; bool check = true; string msg = ""; if (form.operId == 0) { check = false; } if (string.IsNullOrEmpty(form.code)) { check = false; } if (check) { string s = reportModel.createFavoriteStock(form.code, form.operId); status = s != "02" ? true : false; msg = s != "02" ? s != "03" ? "新增成功!" : "無須新增!" : "新增失敗!"; } else { status = false; msg = "資料輸入錯誤!"; } return(Json(new Results <DBNull> { Success = status, Message = msg, Data = null, TotalCount = status ? 1 : 0 })); }