/// <summary> /// 选择数据 /// </summary> protected void refresh() { DataView dv = new CawCorpDB().Select(this.drgCompany.SelectedIndex==0 ? "" : this.drgCompany.SelectedValue); GridView1.DataSource = dv; GridView1.DataBind(); //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行 CallJsFun("ChangeColor();"); }
public object RePortBerth(object Port, object Berth) { string p = Convert.ToString(Port); string b = Convert.ToString(Berth); string flg="1"; CawCorpDB cdb = new CawCorpDB(); string pname = cdb.GetCompany(p, out flg).Count == 0 ? string.Empty : cdb.GetCompany(p, out flg)[0].NAME; string bname = cdb.GetCompany(b, out flg).Count == 0 ? string.Empty : cdb.GetCompany(b, out flg)[0].NAME; return (object)(pname + bname); }
private void InitiData() { this.lblCompanyGuid.Text = Session["ORGID"].ToString(); this.lblCompanyName.Text = Session["CompanyName"].ToString(); //企业基本情况 List<Detail_CAW_COMPANY> DCCompany = new CawCorpDB().GetCompany(this.lblCompanyGuid.Text); this.txtPortOperator.Text = DCCompany[0].NAME; this.txtEnrollAddress.Text = DCCompany[0].ADDRESS; this.txtMessageAddress.Text = DCCompany[0].ADDRESS; this.txtMessagePost.Text = DCCompany[0].POSTALCODE; }
/// <summary> /// 选择所有的公司信息 /// </summary> private void AddTopNodes() { List<Detail_CAW_COMPANY> DCC = new CawCorpDB().GetAllCompanyForTree(); ZJGEportTreeNode node; for (int i = 0; i < DCC.Count; i++) { node = new ZJGEportTreeNode(); node.Text = DCC[i].NAME; node.Value = DCC[i].GUID; node.PopulateOnDemand = false; node.CtrlClickFunction = "AutoSetPValue(this,'" + node.Value + "','" + node.Text + "')"; TreeView1.Nodes.Add(node); } }