/// <summary> /// 签到 /// </summary> /// <param name="obj"></param> /// <returns></returns> public ActionResult CheckIn(string obj) { Hashtable param = JSON.Deserialize <Hashtable>(obj); ParamVessel p = new ParamVessel(); p.Add("id_user", (long)0, HandleType.ReturnMsg); p.Add("location", string.Empty, HandleType.ReturnMsg); p.Add("des", string.Empty, HandleType.ReturnMsg); p.Add("id_create", 0, HandleType.DefaultValue); param = param.Trim(p); if (param["id_create"].ToString().Equals("0")) { param["id_create"] = param["id_user"]; } BaseResult br = new BaseResult(); try { Tb_User_Checkin checkIn = new Tb_User_Checkin(); checkIn.des = param["des"].ToString(); checkIn.id_user = param["id_user"].ToString(); checkIn.id_create = param["id_create"].ToString(); checkIn.location = param["location"].ToString(); br = BusinessFactory.UserCheckIn.Add(checkIn); } catch (CySoftException ex) { throw ex; } catch (Exception ex) { throw ex; } return(Json(br)); }
public override BaseResult Add(dynamic entity) { BaseResult br = new BaseResult(); Tb_User_Checkin checkIn = (Tb_User_Checkin)entity; if (checkIn != null) { DAL.Add(checkIn); br.Success = true; br.Message.Add("业务员签到成功!"); } return(br); }