Ejemplo n.º 1
0
        /// <summary>
        /// 8、	注册(创建)医院
        /// </summary>
        /// <param name="title">医院名称</param>
        /// <param name="contact">联系人</param>
        /// <param name="idcard">18位身份证</param>
        /// <param name="mobile">手机,后6位为管理员的登录密码</param>
        /// <returns></returns>
        /// Jack Ding
        public HospitalRegisterResponse Register(string token, string title, string contact, string idcard, string mobile, string address, string telphone, string deptname)
        {
            string strResponse = string.Empty;
            HospitalRegisterResponse response = new HospitalRegisterResponse();

            try
            {
                Dictionary <string, string> sPara = new Dictionary <string, string>();
                sPara.Add("title", title);
                sPara.Add("contact", contact);
                sPara.Add("idcard", idcard);
                sPara.Add("mobile", mobile);
                sPara.Add("address", address);
                sPara.Add("tel", telphone);
                sPara.Add("deptname", deptname);

                strResponse = F8YLSubmit.BuildRequest(sPara, "hospital/register?token=" + token);

                response = JsonHelper.DeserializeJsonToObject <HospitalRegisterResponse>(strResponse);

                return(response);
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        public string RegisterHospital(string title, string contact, string idcard, string mobile, string address, string telphone, string deptname)
        {
            string jsonRegister = string.Empty;

            try
            {
                HospitalRequest          hr    = new HospitalRequest();
                var                      token = Session["token"] == null ? "XXXXXXX" : Session["token"].ToString();
                HospitalRegisterResponse registerHospitalResponse = new HospitalRegisterResponse();
                registerHospitalResponse = hr.Register(token, title, contact, idcard, mobile, address, telphone, deptname);
                jsonRegister             = JsonHelper.SerializeObject(registerHospitalResponse);
            }
            catch (Exception ex)
            {
                AppLog.Instance.Write("RegisterHospital", AppLog.LogMessageType.Error, ex);
            }
            return(jsonRegister);
        }