private T_Operator GetOne(string pinyin) { T_Operator o = new T_Operator(); o.o_pinyin = UserNameTextBox.Text; var data = JsonHelper.Serialize(o); var hresp = HttpHelper.PostJSON(string.Format("http://{0}:{1}/operator/get_one", IP, Port), data); var resp = HttpHelper.GetResponseString(hresp); var r = JsonHelper.DeserializeToObject <Response>(resp); if (r.result == true) { return(JsonHelper.DeserializeToObject <T_Operator>(JsonHelper.Serialize(r.reason))); } else { return(null); } }
public DoctorMain(T_Operator o) { InitializeComponent(); op = o; }