protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                lblMsg.Text = "";
                LabelCurrentLicense.Visible = false;

                openconnection();
                System.Data.DataSet dsLicense;
                SqlParameter        licenseKey = new SqlParameter("@LicenseKey", TextBoxLicenseKey.Text);
                dsLicense = SqlHelper.ExecuteDataset(cn, System.Data.CommandType.StoredProcedure, "GetLicenseByLicenseKey", licenseKey);

                GridViewLicense.DataSource = dsLicense;
                GridViewLicense.DataBind();

                fillLicense();

                if (GridViewLicense.Rows.Count == 0)
                {
                    lblMsg.Text      = "No License Key data available. </BR>";
                    lblMsg.ForeColor = System.Drawing.Color.Red;
                }
                else
                {
                    LabelCurrentLicense.Visible = true;
                }

                if (gvLicenses.Rows.Count == 0)
                {
                    lblMsg.Text              += "No License Key history data available.";
                    lblMsg.ForeColor          = System.Drawing.Color.Red;
                    PanelLicenseAudit.Visible = false;
                }
            }
            catch (Exception ex)
            {
                lblMsg.Text      = ex.Message;
                lblMsg.ForeColor = System.Drawing.Color.Red;
            }
            finally
            {
                cn.Close();
            }
        }
예제 #2
0
        private void BindAccessMethodLayout()
        {
            if (Convert.ToInt32(DropDownListAccessMethod.SelectedValue) == 1) //Online
            {
                PanelInSparMapper.Visible = true;
                PanelInstall.Visible      = false;
                PanelOnline.Visible       = true;

                InsightSupplierContactLicense insightSupplierContactLicense = InsightSupplierContactLicense.GetInsightSupplierContactLicenseOnlineByInsightSupplierContactId(this.insightSupplierContactId);

                //DropDownListLicense.Items.FindByValue("0").Selected = true;
                //DropDownListQlikviewVersion.Items.FindByValue("0").Selected = true;
                GridViewLicense.DataSource = null;
                GridViewLicense.DataBind();

                TextBoxUsername.Text = insightSupplierContactLicense.Username;
                TextBoxPassword.Text = insightSupplierContactLicense.Password;
            }
            else if (Convert.ToInt32(DropDownListAccessMethod.SelectedValue) == 2) //Install
            {
                PanelInSparMapper.Visible = true;
                PanelInstall.Visible      = true;
                PanelOnline.Visible       = false;
                BindLicenseGridView(this.insightSupplierContactId);

                RadioButtonAvailableLicenseKeys.Checked = true;
                RadioButtonAllocatedLicenseKeys.Checked = false;

                PanelLicenseAvailable.Visible     = true;
                PanelLicenseAllocated.Visible     = false;
                PanelViewLicenseDropdown.Visible  = true;
                PanelLicenseAllocatedGrid.Visible = false;
            }
            else
            {
                PanelInSparMapper.Visible = false;
                PanelInstall.Visible      = false;
            }
        }
예제 #3
0
        void BindData()
        {
            PS_STUDY  PStudy = new PS_STUDY();
            DataTable dt1    = PStudy.SELECT_PS_STUDY("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "");

            GridViewStudy.DataSource = dt1;
            GridViewStudy.DataBind();
            SetViewState(dt1);

            PS_PRO_LICENSE PLicense = new PS_PRO_LICENSE();
            DataTable      dt2      = PLicense.SELECT_PS_PRO_LICENSE("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "");

            GridViewLicense.DataSource = dt2;
            GridViewLicense.DataBind();
            SetViewState(dt2);

            PS_TRAINING Training = new PS_TRAINING();
            DataTable   dt3      = Training.SELECT_PS_TRAINING("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "");

            GridViewTraining.DataSource = dt3;
            GridViewTraining.DataBind();
            SetViewState(dt3);

            PS_PUNISHMENT Punishment = new PS_PUNISHMENT();
            DataTable     dt4        = Punishment.SELECT_PS_PUNISHMENT("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "");

            GridViewPunish.DataSource = dt4;
            GridViewPunish.DataBind();
            SetViewState(dt4);

            PS_POSI_AND_SALARY PosiSalary = new PS_POSI_AND_SALARY();
            DataTable          dt5        = PosiSalary.SELECT_PS_POSI_AND_SALARY("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "", "", "", "", "");

            GridViewPosiSalary.DataSource = dt5;
            GridViewPosiSalary.DataBind();
            SetViewState(dt5);
        }
예제 #4
0
 private void BindLicenseGridView(int insightSupplierContactId)
 {
     GridViewLicense.DataSource = InsightSupplierContactLicense.GetInsightSupplierContactLicenseListByInsightSupplierContactId(insightSupplierContactId);
     GridViewLicense.DataBind();
 }
예제 #5
0
 protected void myGridViewLicense_PageIndexChanging2(object sender, GridViewPageEventArgs e)
 {
     GridViewLicense.PageIndex  = e.NewPageIndex;
     GridViewLicense.DataSource = GetViewState();
     GridViewLicense.DataBind();
 }