protected void LoadData() { DataTable dtShop = new ConfigureBLL().GetShopKeys(); string shopId = Request.QueryString["shopid"]; if (!string.IsNullOrEmpty(shopId)) { txtShopId.Text = shopId; txtShopId.Enabled = false; txtShopName.Text = dtShop.AsEnumerable().Where(item => item.Field <string>("shopid") == shopId).Select(t => t.Field <string>("configValue")).FirstOrDefault(); txtShopName.Enabled = false; txtAccessKey.Text = dtShop.AsEnumerable().Where(item => item.Field <string>("shopid") == shopId).Select(t => t.Field <string>("AccessKey")).FirstOrDefault(); txtSecretKey.Text = dtShop.AsEnumerable().Where(item => item.Field <string>("shopid") == shopId).Select(t => t.Field <string>("SecretKey")).FirstOrDefault(); } }
protected void LoadData() { try { string fileHistoryId = Request.QueryString["fileHistoryId"]; if (string.IsNullOrEmpty(fileHistoryId)) { return; } string prjId = fhBll.GetProjectIdById(fileHistoryId); Project prj = new ProjectBLL().GetModel(prjId); DataTable dtShopName = new ConfigureBLL().GetConfig("店铺编号名称"); lblShopName.Text = dtShopName.AsEnumerable().Where(item => item.Field <string>("configKey") == prj.SHOP).Select(item2 => item2.Field <string>("configValue")).FirstOrDefault(); } catch (Exception ex) { LogHelper.WriteLine("文件分享初始化异常," + ex.Message + ex.StackTrace); lblShopName.Text = "Shop 初始化异常"; lblShopName.ForeColor = System.Drawing.Color.Red; } }