Exemple #1
0
 private bool checkToken(string username, string password)
 {
     if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password))
     {
         return(false);
     }
     else
     {
         FpUtility.Fp_Common.UnameAndPwd up    = new FpUtility.Fp_Common.UnameAndPwd(username, password);
         FpUtility.Fp_BLL.Token          token = new FpUtility.Fp_BLL.Token(up);
         bool b = token.checkAuth_Token();
         return(b);
     }
 }
Exemple #2
0
        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");
                }
            }
            FpUtility.Fp_Common.UnameAndPwd up = new FpUtility.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 "departments": Response.Write(ReturnDepartments()); break;
                case "SampleType": Response.Write(ReturnSampleType(up)); break;
                case "ssType": Response.Write(ReturnSampleSocrceType(up)); break;
                case "SampleGroups": Response.Write(ReturnSampleGroups(up)); break;
                default:
                    break;
            }
        }
Exemple #3
0
 private bool checkToken(string username, string password)
 {
     if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password))
     {
         return false;
     }
     else
     {
         FpUtility.Fp_Common.UnameAndPwd up = new FpUtility.Fp_Common.UnameAndPwd(username, password);
         FpUtility.Fp_BLL.Token token = new FpUtility.Fp_BLL.Token(up);
         bool b = token.checkAuth_Token();
         return b;
     }
 }
Exemple #4
0
 public string ImportSampleSourceDataToFp(string sampleSourceTypeName, Dictionary<string, string> sampleSourceFieldsDic)
 {
     //01.将字典转换成json格式的字符串
     //02.将此字符串转换成Fp需要的格式
     //03.调用数据层方法提交数据到Fp,并接受返回值
     string username = RuRo.Common.CookieHelper.GetCookieValue("username");
     string password = RuRo.Common.CookieHelper.GetCookieValue("password");
     string result = string.Empty;
     FpUtility.Fp_Common.UnameAndPwd up = new FpUtility.Fp_Common.UnameAndPwd(username, password);
     if (up != null)
     {
         result = FpUtility.Fp_BLL.SampleSocrce.ImportSampleSourceDataToFp(up, sampleSourceTypeName, sampleSourceFieldsDic);
     }
     //string sampleSourceFieldsJsonStr = FpJsonHelper.DictionaryToJsonString(sampleSourceFieldsDic);
     //string result = dataWithFP.ImportSampleSource(FpMethod.import_sources, "&sample_source_type=" + sampleSourceTypeName + "&json=" + sampleSourceFieldsJsonStr);
     return result;
 }