public DataTable Usp_User_Login(string loginName, string password)
        {
            DataTable table = DataHelper.FillDataTable("Usp_User_Login", new { C_Login = loginName, C_Password = SHA256(password) });

            if (table.Rows.Count > 0)
            {
                SessionState["C_Login"] = loginName;
                InfoLog.Info(string.Format("登录名:{0}, 登录时间:{1}", SessionState["C_Login"].ToString(), DateTime.Now));
            }
            return(table);
        }
        public int UploadFiles()
        {
            try
            {
                FileEntity fileEntity = new FileEntity();
                fileEntity.I_Owner      = int.Parse(HttpContext.Current.Request["I_Owner"]);
                fileEntity.I_Category   = Convert.ToInt32(HttpContext.Current.Request["I_Category"]);
                fileEntity.C_Remark     = HttpContext.Current.Request["C_Remark"];
                fileEntity.I_Uploader   = Convert.ToInt32(HttpContext.Current.Request["I_Uploader"]);
                fileEntity.D_Upload     = DateTime.Now;
                fileEntity.C_OriginName = HttpContext.Current.Request.Files[0].FileName;

                InfoLog.Info(string.Format("登录名:{0}, 上传文件:{1}", SessionState["C_Login"].ToString(), Newtonsoft.Json.JsonConvert.SerializeObject(fileEntity)));
                string fileUploadPath = ConfigurationManager.AppSettings["FileUpload"].ToString();

                int index = fileEntity.C_OriginName.LastIndexOf('.');
                if (index == -1)
                {
                    index = 0;
                }
                fileEntity.C_FileName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + fileEntity.C_OriginName.Substring(index);

                if (HttpContext.Current.Request.Files[0].ContentLength > 0)
                {
                    string path = System.IO.Path.Combine(fileUploadPath, fileEntity.I_Owner.ToString());
                    if (!Directory.Exists(path))
                    {
                        Directory.CreateDirectory(path);
                    }
                    HttpContext.Current.Request.Files[0].SaveAs(path + "\\" + fileEntity.C_FileName);
                    DataHelper.ExecuteNonQuery("Usp_File_Insert", fileEntity);
                    return(1);
                }
                return(-1);
            }
            catch (Exception ex)
            {
                return(-1);
            }
        }