Esempio n. 1
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            lblMsg.Text = "Selected id=" + GridView1.SelectedRow.Cells[1].Text;
            string sn = GridView1.SelectedRow.Cells[1].Text;
            //调用业务层方法获取实体
            GoodsManageBIZ biz  = new GoodsManageBIZ();
            GoodsBaseInfo  info = biz.GetGoodsBaseInfo(sn);

            //将实体与页面控件绑定
            WebControlDataMap.FillDataFromEntityClass(info,
                                                      MyWebForm.GetIBControls(this.tbGoosBaseInfo.Controls)
                                                      );
        }
Esempio n. 2
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            lblMsg.Text = "Selected id=" + GridView1.SelectedRow.Cells[1].Text;
            string customerId = GridView1.SelectedRow.Cells[1].Text;
            //调用业务层方法获取实体
            CustomerManageBIZ   biz  = new CustomerManageBIZ();
            CustomerContactInfo info = biz.GetCustomerContactInfo(customerId);

            //将实体与页面控件绑定
            WebControlDataMap.FillDataFromEntityClass(info,
                                                      MyWebForm.GetIBControls(this.tbCustomerInfo.Controls)
                                                      );
            //标记当前表单为编辑状态,主键控件不可编辑
            dbtCID.ReadOnly             = true;
            this.tbCustomerInfo.Visible = true;
            lblMsg.Text = "编辑客户联系信息后请保存!";
        }