Пример #1
0
        private void LoadWMServiceTasks()
        {
            DataSet ds = oWMServiceTasks.getWMServiceTasksStatus(
                intRequest,
                intService,
                intItem,
                intNumber);

            dlWMServiceTaskList.DataSource = ds;
            dlWMServiceTaskList.DataBind();
            string strService = oService.Get(intService, "name");
        }
        private void LoadWMServiceTasks()
        {
            DataSet ds = oWMServiceTasks.getWMServiceTasksStatus(
                Int32.Parse(hdnRequestId.Value),
                Int32.Parse(hdnServiceId.Value),
                Int32.Parse(hdnItemId.Value),
                Int32.Parse(hdnNumber.Value),
                Int32.Parse(hdnAssetId.Value));

            dlWMServiceTaskList.DataSource = ds;
            dlWMServiceTaskList.DataBind();
            string strService = oService.Get(Int32.Parse(hdnServiceId.Value), "name");

            if (ds.Tables[0].Rows.Count > 1)
            {
                DataRow dr       = ds.Tables[0].Rows[0];
                int     intAsset = Int32.Parse(dr["AssetId"].ToString());

                if (intAsset == 0)
                {
                    pnlAllow.Visible  = false;
                    pnlDenied.Visible = true;
                }
                else
                {
                    lblAssetID.Text = "#" + intAsset.ToString();

                    string strSerial = dr["AssetSerial"].ToString();
                    string strAsset  = dr["AssetTag"].ToString();
                    string strHeader = (strSerial.Length > 15 ? strSerial.Substring(0, 15) + "..." : strSerial);

                    lblHeader.Text    = """ + strHeader.ToUpper() + """;
                    Master.Page.Title = strService + "(" + strHeader + ")";
                    lblHeaderSub.Text = strService + "...";

                    txtAssetSerial.Text = dr["AssetSerial"].ToString();
                    txtAssetTag.Text    = dr["AssetTag"].ToString();

                    dlWMServiceTaskList.DataSource = ds;
                    dlWMServiceTaskList.DataBind();
                }
            }
        }