/// <summary>
 /// 根据二维码获取分享
 /// </summary>
 /// <param name="qrcode"></param>
 /// <returns></returns>
 public static UserShare GetUserShare(string qrcode)
 {
     DataTable dt = BackModelSetDAL.GetDataTable("select top 1 *  from UserShare where qrcode='" + qrcode + "'");
     UserShare model = new UserShare();
     foreach (DataRow dr in dt.Rows)
     { 
         model.FillData(dr); 
     }
     return model;
 }
 public static SysSetting GetSysSetting()
 {
     DataTable dt = BackModelSetDAL.GetDataTable("select top 1 *  from SysSetting ");
     SysSetting model = new SysSetting();
     foreach (DataRow dr in dt.Rows)
     {
         model.FillData(dr);
     }
     return model;
 }
 /// <summary>
 /// 获取用户分享
 /// </summary>
 /// <param name="userid"></param>
 /// <returns></returns>
 public static List<UserShare> GetUserShareList(string userid)
 { 
     DataTable dt = BackModelSetDAL.GetDataTable("select *  from UserShare where userid='" + userid + "'");
     List<UserShare> list = new List<UserShare>();
     foreach (DataRow dr in dt.Rows)
     {
         UserShare model = new UserShare();
         model.FillData(dr);
         list.Add(model);
     }
     return list;
 }
 public static BackModel GetBackById(int BackID )
 {
     DataTable dt = BackModelSetDAL.GetDataTable("select *  from BackModel where AutoID=" + BackID); 
     List<BackModel> list = new List<BackModel>();
     foreach (DataRow dr in dt.Rows)
     {
         BackModel model = new BackModel();
         model.FillData(dr);
         list.Add(model);
     }
     return list.FirstOrDefault();
 }