/// <summary>
 /// 界面初始化时
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmAssPurchaseOrderEdit_Load(object sender, EventArgs e)
 {
     try
     {
         UserId = Client.Session["UserID"].ToString();
         var asspo = _autofacConfig.AssPurchaseOrderService.GetById(POID);
         if (asspo != null)
         {
             txtPOID.Text    = POID;
             txtName.Text    = asspo.NAME;
             txtRealID.Text  = asspo.REALID;
             btnDealMan.Tag  = asspo.PURCHASER;
             btnDealMan.Text = asspo.PURCHASERNAME + "   > ";
             btnVendor.Tag   = asspo.VID;
             btnVendor.Text  = asspo.VNAME + "   > ";
         }
         var assporow = _autofacConfig.AssPurchaseOrderService.GetPORows(POID);
         if (assporow != null)
         {
             Rows = Mapper.Map <List <AssPORowOutputDto>, List <AssRowInputDto> >(assporow);
             ListATs.DataSource = Rows;
             ListATs.DataBind();
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 界面初始化时
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmAssSalesOrderEdit_Load(object sender, EventArgs e)
 {
     try
     {
         UserId = Client.Session["UserID"].ToString();
         var assso = _autofacConfig.AssSalesOrderService.GetById(SOID);
         if (assso != null)
         {
             txtPOID.Text    = SOID;
             txtName.Text    = assso.NAME;
             txtRealID.Text  = assso.REALID;
             btnDealMan.Tag  = assso.SALESPERSON;
             btnDealMan.Text = assso.SALESPERSONNAME;
             btnCus.Tag      = assso.CUSID;
             btnCus.Text     = assso.CUSNAME;
         }
         var assSorow = _autofacConfig.AssSalesOrderService.GetSORows(SOID);
         if (assSorow != null)
         {
             Rows = Mapper.Map <List <AssSORowOutputDto>, List <AssRowInputDto> >(assSorow);
             ListATs.DataSource = Rows;
             ListATs.DataBind();
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }
 /// <summary>
 /// 数据加载
 /// </summary>
 public void Bind()
 {
     try
     {
         if (Rows.Count > 0)
         {
             ListATs.DataSource = Rows;
             ListATs.DataBind();
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }