private void ShowInfo(int Id) { ESMonitor.BLL.Stats bll = new ESMonitor.BLL.Stats(); ESMonitor.Model.Stats model = bll.GetModel(Id); this.lblId.Text = model.Id.ToString(); this.lblStatCode.Text = model.StatCode; this.lblStatName.Text = model.StatName; this.lblChargeMan.Text = model.ChargeMan; this.lblTelepone.Text = model.Telepone; this.lblLongitude.Text = model.Longitude.ToString(); this.lblDepartment.Text = model.Department; this.lblAdress.Text = model.Adress; this.lblCountry.Text = model.Country; this.lblStreet.Text = model.Street; this.lblSquare.Text = model.Square.ToString(); this.lblProStartTime.Text = model.ProStartTime.ToString(); this.lblStage.Text = model.Stage.ToString(); }
protected void GetDevs() { string statId = Request.Params["sid"]; string strWhere = "StatId =" + statId; DataSet ds = bll.GetList(strWhere); if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { ListItem item = new ListItem { Text = dr["DevCode"].ToString(), Value = dr["Id"].ToString() }; controlPreset.Items.Add(item); } devId.Value = controlPreset.SelectedValue; devCode.Value = Server.UrlEncode(controlPreset.SelectedItem.Text); } ESMonitor.BLL.Stats bllstat = new ESMonitor.BLL.Stats(); statName = bllstat.GetModel(int.Parse(statId)).StatName; DevName = controlPreset.SelectedItem.Text; }
private void GetStat(int statId) { ESMonitor.Model.Stats model = _bll.GetModel(statId); txtNo.Text = model.StatCode; txtName.Text = model.StatName; txtAddr.Text = model.Address; txtChargeMan.Text = model.ChargeMan; txtMobile.Text = model.Telepone; txtDept.Text = model.Department; foreach (ListItem item in ddlCountry.Items) { if (item.Value == model.Country) { item.Selected = true; break; } } txtStreet.Text = model.Street; txtSquare.Text = string.Format("{0:F}", model.Square); string stage = model.Stage.ToString(); foreach (ListItem item in ddlStage.Items) { if (item.Value == stage) { item.Selected = true; break; } } txtStartTime.Text = model.ProStartTime.ToString("yyyy-MM-dd"); txtLocation.Text = model.Longitude + ";" + model.Latitude; }
protected void GetDevs() { string statId = Request.Params["sid"]; if (statId == "") { return; } ddlDevs.Items.Clear(); StringBuilder sb = new StringBuilder(); sb.Append("StatId = "); sb.Append(statId); DataSet ds = _bllDevs.GetList(sb.ToString()); foreach (DataRow dr in ds.Tables[0].Rows) { ListItem item = new ListItem { Text = dr["DevCode"].ToString(), Value = dr["Id"].ToString() }; ddlDevs.Items.Add(item); } statName = _bllStats.GetModel(int.Parse(statId)).StatName; }