コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            checkExpAll();
            checkLocAll();
            if (!Page.IsPostBack)
            {
                var con  = new SqlConnection(strConnection);
                var com  = "Select distinct NAME from QStock Order By NAME";
                var adpt = new SqlDataAdapter(com, con);
                var dt   = new DataTable();
                adpt.Fill(dt);
                DropName.DataSource = dt;
                DropName.DataBind();
                DropName.DataTextField  = "NAME";
                DropName.DataValueField = "NAME";
                DropName.DataBind();

                //check webservice
                var serviced =
                    Helper.IsServiceAvailable(
                        "http://172.16.5.94:50000/XMII/WSDLGen/KPC_UNGANISHA/QMS/Transactions/getStockEntitlementTrx");

                if (serviced == false)
                {
                    Analog.Visible = true;
                }
            }
            EntryLocSource.SelectParameters["TheDate"].DefaultValue = DateTime.Today.ToString();
            EntryExpSource.SelectParameters["TheDate"].DefaultValue = DateTime.Today.ToString();
        }
コード例 #2
0
    /// <summary>
    /// 数据绑定
    /// </summary>
    private void DataBing_()
    {
        RepArticlec.DataSource = ArticleColumnManager.GetArticleColumnAll();
        RepArticlec.DataBind();

        DropName.DataSource     = UserManager.GetGeneralUserByRoleId(3);
        DropName.DataTextField  = "RealName";
        DropName.DataValueField = "Id";
        DropName.SelectedIndex  = 0;
        DropName.DataBind();
    }