Esempio n. 1
0
        private void LoadData()
        {
            btnClose.OnClientClick = ActiveWindow.GetHideReference();
            DataSet ds = m_bllCK_People.GetList("");

            DropDownListPeople.DataTextField  = "CK_PeopleName";
            DropDownListPeople.DataValueField = "CK_PeopleID";
            DropDownListPeople.DataSource     = ds.Tables[0];
            DropDownListPeople.DataBind();
            DropDownListPeople.SelectedIndex = 0;

            ds = m_bllCK_Product.GetList("");
            DropDownListProduct.DataTextField  = "CK_ProductName";
            DropDownListProduct.DataValueField = "CK_ProductID";
            DropDownListProduct.DataSource     = ds.Tables[0];
            DropDownListProduct.DataBind();
            DropDownListProduct.SelectedIndex = 0;
        }
Esempio n. 2
0
        private void LoadData()
        {
            btnClose.OnClientClick = ActiveWindow.GetHideReference();


            DataSet ds = m_bllCK_People.GetList("");

            DropDownListPeople.DataTextField  = "CK_PeopleName";
            DropDownListPeople.DataValueField = "CK_PeopleID";
            DropDownListPeople.DataSource     = ds.Tables[0];
            DropDownListPeople.DataBind();
            DropDownListPeople.SelectedIndex = 0;

            ds = m_bllCK_Product.GetList("");
            DropDownListProduct.DataTextField  = "CK_ProductName";
            DropDownListProduct.DataValueField = "CK_ProductID";
            DropDownListProduct.DataSource     = ds.Tables[0];
            DropDownListProduct.DataBind();
            DropDownListProduct.SelectedIndex = 0;

            int id = GetQueryIntValue("id");

            TSM.Model.CK_SendGoods modelCK_SendGoods = m_bllCK_SendGoods.GetModel(id);

            if (modelCK_SendGoods == null)
            {
                // 参数错误,首先弹出Alert对话框然后关闭弹出窗口
                Alert.Show("参数错误!", String.Empty, ActiveWindow.GetHideReference());
                return;
            }
            DropDownListProduct.SelectedValue = modelCK_SendGoods.CK_ProductID.ToString();
            DropDownListPeople.SelectedValue  = modelCK_SendGoods.CK_PeopleID.ToString();
            tbxCount.Text            = modelCK_SendGoods.CK_SendGoodsAmount.ToString();
            DatePicker1.SelectedDate = modelCK_SendGoods.CK_SendGoodsDate;
            //tbxName.Text = modelCK_SendGoods.CK_SendGoodsName;
            //tbxPhoneNo.Text = modelCK_SendGoods.CK_PhoneNo;
            //tbxNote.Text = modelCK_SendGoods.CK_Comment;
        }