public ActionResult ReadData() { RWCardView rw = new RWCardView(); rw.UserType = LYCard_util.ReadUserType(); rw.UserId = LYCard_util.ReadUserId(); rw.RemainQL = LYCard_util.ReadRemainQL(); rw.DQBH = LYCard_util.ReadDQBH(); return(Json(rw)); }
public string WriteData(RWCardView rw) { string lbResult = ""; string data; data = rw.UserId; if (data == null) { lbResult += "输入用户ID错误"; } else if (data.Length % 2 == 1) { lbResult += "输入用户ID错误"; } else { lbResult += "用户ID:" + LYCard_util.WriteUserId(data); } data = rw.RemainQL; if (data == null) { lbResult += "输入剩余气量错误"; } // else if (data.Length % 2 == 1) lbResult += "输入剩余气量错误"; else { lbResult += "剩余气量:" + LYCard_util.WriteRemainQL(data); } data = rw.DQBH; if (data == null) { lbResult += "输入地区编号错误"; } // else if (data.Length % 2 == 1) lbResult += "输入地区编号错误"; else { lbResult += "地区编号:" + LYCard_util.WriteDQBH(data); } return(lbResult); }