protected void Page_Load(object sender, EventArgs e) { Response.ContentType = "text/plain"; string username = Common.CookieHelper.GetCookieValue("username"); string pwd = Common.CookieHelper.GetCookieValue("password"); string password = string.Empty; if (!string.IsNullOrEmpty(pwd)) { try { password = Common.DEncrypt.DESEncrypt.Decrypt(pwd); } catch (Exception ex) { Common.LogHelper.WriteError(ex); Response.Redirect("Login.aspx"); } } FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(username, password); string mark = Request.Params["conMarc"]; switch (mark) { case "SexFlag": Response.Write(ReturnGender()); break; case "Mzzybz": Response.Write(ReturnIn_CodeType()); break; case "BloodTypeFlag": Response.Write(ReturnBloodTypeFlag()); break; case "SamplingMethod": Response.Write(ReturnSamplingMethodData()); break; case "DiagnoseTypeFlag": Response.Write(ReturnDiagnoseTypeFlag()); break; case "SampleType": Response.Write(ReturnSampleType(up)); break; case "departments": Response.Write(ReturnDepartments()); break; case "SampleGroups": Response.Write(ReturnSampleGroups(up)); break; default: break; } }
private bool checkToken(string username, string password) { if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password)) { return(false); } else { FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(username, password); FreezerProUtility.Fp_BLL.Token token = new FreezerProUtility.Fp_BLL.Token(up); return(token.checkAuth_Token()); } }
protected void Page_Load(object sender, EventArgs e) { Response.ContentType = "text/plain"; string username = Common.CookieHelper.GetCookieValue("username"); string pwd = Common.CookieHelper.GetCookieValue("password"); string password = string.Empty; if (!string.IsNullOrEmpty(pwd)) { try { password = Common.DEncrypt.DESEncrypt.Decrypt(pwd); } catch (Exception ex) { Common.LogHelper.WriteError(ex); Response.Redirect("Login.aspx"); } } FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(username, password); string mark = Request.Params["conMarc"]; switch (mark) { case "SexFlag": Response.Write(ReturnGender()); break; case "Mzzybz": Response.Write(ReturnIn_CodeType()); break; case "BloodTypeFlag": Response.Write(ReturnBloodTypeFlag()); break; case "SamplingMethod": Response.Write(ReturnSamplingMethodData()); break; case "DiagnoseTypeFlag": Response.Write(ReturnDiagnoseTypeFlag()); break; case "SampleType": Response.Write(ReturnSampleType(up)); break; //case "departments": Response.Write(ReturnDepartments()); break; case "SampleGroups": Response.Write(ReturnSampleGroups(up)); break; default: break; } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string username = Common.CookieHelper.GetCookieValue("username"); string pwd = Common.CookieHelper.GetCookieValue("password"); string departments = Common.CookieHelper.GetCookieValue("departments"); string password = string.Empty; if (!string.IsNullOrEmpty(pwd)) { try { password = Common.DEncrypt.DESEncrypt.Decrypt(pwd); } catch (Exception ex) { Common.LogHelper.WriteError(ex); context.Response.Redirect("Login.aspx"); } } FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(username, password); string mark = context.Request.Params["conMarc"]; switch (mark) { //case "SexFlag": Response.Write(ReturnGender()); break; //case "In_CodeType": Response.Write(ReturnIn_CodeType()); break; //case "BloodTypeFlag": Response.Write(ReturnBloodTypeFlag()); break; //case "SamplingMethod": Response.Write(ReturnSamplingMethodData()); break; //case "DiagnoseTypeFlag": Response.Write(ReturnDiagnoseTypeFlag()); break; //case "linkage": Response.Write(ReturnGet_Linkage()); break; //case "linkagefrom": Response.Write(ReturnGet_Linkage2()); break; //case "Employee": Response.Write(ReturnGet_Employee()); break; //case "SampleType": Response.Write(ReturnSampleType(up, username)); break; //case "departments": Response.Write(ReturnDepartments()); break; //case "SampleGroups": Response.Write(ReturnSampleGroups(up)); break; //case "SampleType_S": Response.Write(ReturnSampleType_S(up)); break; //case "SampleType_U": Response.Write(ReturnSampleType_U(up)); break; //case "SampleType_keti": Response.Write(Returnketi(up)); break; //case "ComSetting": Response.Write(ReturnComSetting()); break; case "QuerySetting": ReturnQuerySetting(context); break; default: break; } }
/// <summary> /// 获取登陆信息 /// </summary> /// <returns></returns> public FreezerProUtility.Fp_Common.UnameAndPwd GetUp() { string username = Common.CookieHelper.GetCookieValue("username"); string pwd = Common.CookieHelper.GetCookieValue("password"); string keshi = Common.CookieHelper.GetCookieValue(username + "department"); string password = string.Empty; if (!string.IsNullOrEmpty(pwd)) { try { password = Common.DEncrypt.DESEncrypt.Decrypt(pwd); } catch (Exception ex) { Common.LogHelper.WriteError(ex); HttpContext.Current.Response.Redirect("Login.aspx"); } } FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(username, password);//存放登陆账号密码 return up; }
private string ReturnSampleGroups(FreezerProUtility.Fp_Common.UnameAndPwd up) { Common.CreatFpUrl fpurl = new Common.CreatFpUrl(); string url = fpurl.FpUrl; Dictionary <string, string> dic = FreezerProUtility.Fp_BLL.SampleGroup.GetAllIdAndNameDic(up); List <Dictionary <string, string> > list = new List <Dictionary <string, string> >(); if (dic.Count > 0) { foreach (KeyValuePair <string, string> dd in dic) { Dictionary <string, string> temdic = new Dictionary <string, string>(); temdic.Add("value", dd.Key); temdic.Add("text", dd.Value); list.Add(temdic); } } string json = FreezerProUtility.Fp_Common.FpJsonHelper.DictionaryListToJsonString(list); return(json); }
/// <summary> /// 样品类型数据 /// </summary> /// <returns></returns> private string ReturnSampleSocrceType(FreezerProUtility.Fp_Common.UnameAndPwd up) { //string res = "[{\"value\": \"0\",\"text\": \"基本信息-心研所\" },{\"value\": \"1\", \"text\": \"基本信息-肺癌所\"}]"; Common.CreatFpUrl fpurl = new Common.CreatFpUrl(); string url = fpurl.FpUrl; Dictionary <string, string> dic = FreezerProUtility.Fp_BLL.SampleSocrce.GetAllIdAndNamesDic(up); List <Dictionary <string, string> > list = new List <Dictionary <string, string> >(); if (dic.Count > 0) { foreach (KeyValuePair <string, string> dd in dic) { Dictionary <string, string> temdic = new Dictionary <string, string>(); temdic.Add("value", dd.Key); temdic.Add("text", dd.Value); list.Add(temdic); } } string json = FreezerProUtility.Fp_Common.FpJsonHelper.DictionaryListToJsonString(list); return(json); }
protected void Unnamed_Click(object sender, EventArgs e) { string u = U.Text.Trim(); string p = P.Text.Trim(); string t = T.Text.Trim(); string w = W.Text.Trim(); string y = Y.Text.Trim(); FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(u, p); FreezerProUtility.Fp_BLL.TestData testData = new FreezerProUtility.Fp_BLL.TestData(); Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("Sample Source", y); //dic.Add("网络链接地址", w); dic.Add("图片网络链接地址1", t); List<Dictionary<string, string>> list = new List<Dictionary<string, string>>() { dic }; System.Text.StringBuilder str = new System.Text.StringBuilder(); for (int i = 0; i < 100; i++) { str.Append(i + ";"); string res = FreezerProUtility.Fp_BLL.TestData.ImportTestData(up, "知情同意书管理", list); } Response.Write(str.ToString()); }
private bool checkToken(string username, string password) { if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password)) { return false; } else { FreezerProUtility.Fp_Common.UnameAndPwd up = new FreezerProUtility.Fp_Common.UnameAndPwd(username, password); FreezerProUtility.Fp_BLL.Token token = new FreezerProUtility.Fp_BLL.Token(up); return token.checkAuth_Token(); } }