public ExcutionResult Insert(FeedBacks feedBacks, string userId) { ExcutionResult rowAffected = new ExcutionResult(); try { var param = FeedBackManager.GetById(feedBacks.Id); if (param == null) { var now = DateTime.Now; feedBacks.CreatedAt = now; feedBacks.CreatedBy = userId; rowAffected = FeedBackManager.Insert(feedBacks); } else { rowAffected.Message = "Id already exist"; } } catch (Exception e) { rowAffected.ErrorCode = 1; rowAffected.Message = e.Message; _ilogger.LogError(e.Message, e); } return(rowAffected); }
public ExcutionResult Delete(string id, string userId) { ExcutionResult rowAffected = new ExcutionResult(); try { var param = FeedBackManager.GetById(id); if (param != null) { var now = DateTime.Now; param.UpdatedAt = now; param.UpdatedBy = userId; rowAffected = FeedBackManager.Delete(param); } else { rowAffected.Message = "Id khong ton tai"; } } catch (Exception e) { rowAffected.ErrorCode = 1; rowAffected.Message = e.Message; _ilogger.LogError(e.Message, e); } return(rowAffected); }
//customer own feedbacks public ActionResult Feedback() { if (GetSessionUser() == null) { return(RedirectToAction("Login", "Home")); } List <FeedBack> lstfeedback = FeedBackManager.GetFeedback("CUSTID='" + GetSessionUser().CUSTID + "'", null); return(View(lstfeedback)); }
// Use this for initialization void Start() { if (instance = null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
void Awake() { _obj = GameObject.Find("Manager"); FbManager = _obj.GetComponent <FeedBackManager>(); BmHandler = _obj.GetComponent <ButtonManagerHandler>(); _codersText = FbManager.CodersFeedback.GetComponent <Text>(); _anim = FbManager.CodersFeedback.GetComponent <Animator>(); _anim.enabled = false; _clip = FbManager.Clip; _moveSpeed = BmHandler.MoveSpeed; _rotationAngle = BmHandler.RotationAngle; }
public string Feedback(FeedBack obj) { string ret = ""; FeedBack objfeedback = new FeedBack(); objfeedback.RATING = obj.RATING; objfeedback.FBDATE = DateTime.Now; objfeedback.FBDESCRIPTION = obj.FBDESCRIPTION; objfeedback.CUSTID = GetSessionUser().CUSTID; ret = FeedBackManager.SaveFeedback(objfeedback, null); return(ret); }
public ExcutionResult GetAll() { ExcutionResult ex = new ExcutionResult(); try { var p = FeedBackManager.GetAll(); ex.Data = p; } catch (Exception e) { ex.ErrorCode = 1; ex.Message = e.Message; } return(ex); }
public ExcutionResult Search(string keyword) { ExcutionResult result = new ExcutionResult(); try { var param = FeedBackManager.Search(keyword); result.Data = param; } catch (Exception e) { result.ErrorCode = 1; result.Message = e.Message; _ilogger.LogError(e.Message, e); } return(result); }
public ExcutionResult GetAllByPaging(PagingItem pagingItem) { ExcutionResult ex = new ExcutionResult(); try { var p = FeedBackManager.GetAllByPaging(pagingItem); ex.Data = p; ex.MetaData = pagingItem; } catch (Exception e) { ex.ErrorCode = 1; ex.Message = e.Message; } return(ex); }
public void SetFeedBackColor(FeedBackManager feedBackManager, int[] feedBack, int level, int[] userCode) { if (!EntryManager.IsValidUserCode(userCode)) { return; } for (int i = 0; i < 4; i++) { if (feedBack[i] == 1) { feedBackManager.feedBacks[level].feedback[i].sprite = feedBackColors[1]; } else if (feedBack[i] == 2) { feedBackManager.feedBacks[level].feedback[i].sprite = feedBackColors[0]; } } }
public FeedbackController() { _mgr = new FeedBackManager(); }
public ActionResult ViewFeedback(string id) { List <FeedBack> lstfeedback = FeedBackManager.GetFeedback(""); return(View(lstfeedback)); }