protected void grdvwRecomm_RowCommand(object sender, GridViewCommandEventArgs e) { string filename = ""; string meetingfile = grdvwRecomm.DataKeys[Convert.ToInt32(e.CommandArgument.ToString())].Values[1].ToString(); string newid = grdvwRecomm.DataKeys[Convert.ToInt32(e.CommandArgument.ToString())].Values[0].ToString(); string scrpcd = grdvwRecomm.DataKeys[Convert.ToInt32(e.CommandArgument.ToString())].Values[4].ToString(); string subtype = grdvwRecomm.DataKeys[Convert.ToInt32(e.CommandArgument.ToString())].Values[5].ToString(); string strUrl = ConfigurationManager.AppSettings["downloadPath"].ToString(); if (e.CommandName == "cmdLock") { if (subtype == "CCM") { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "script", "ChkCCM();", true); UpdateCounter(strNewId, scrpcd, newid); } else { UpdateCounter(strNewId, scrpcd, newid); BindData(strNewId); } } }
protected void UpdateCounter(string regid,string scripcd,string newid) { SqlParameter[] objprm = new SqlParameter[3]; objprm[0] = new SqlParameter("@REG_NEW_ID", SqlDbType.VarChar); objprm[0].Value = regid; objprm[1] = new SqlParameter("@SCRIP_CODE", SqlDbType.VarChar); objprm[1].Value = scripcd; objprm[2] = new SqlParameter("@NEW_ID", SqlDbType.VarChar); objprm[2].Value = newid; DataSet ds = SqlHelper.ExecuteDataset(strCon, CommandType.StoredProcedure, "USP_UPDATE_REPORT_CNT", objprm); if (ds.Tables.Count > 0) { if (ds.Tables[0].Rows[0]["Msg"].ToString() == "NOT SUBSCRIB") { Page.RegisterStartupScript("", "<script>alert('Please Enter the Scrip into your Portfolio Account.');</script>"); } else if (ds.Tables[0].Rows[0]["Msg"].ToString() == "PLEASE PROCEED") { Page.RegisterStartupScript("", "<script>alert('File is Available for Download.');</script>"); } else if (ds.Tables[0].Rows[0]["Msg"].ToString() == "YOU HAVE NOT APPROVE BY IIAS TEAM") { Page.RegisterStartupScript("", "<script>alert('File is Not Free.');</script>"); } else { Page.RegisterStartupScript("", "<script>alert('You have exceeded your limits.');</script>"); } } }
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Mse", "ChkCCM();", true);
ScriptManager.RegisterStartupScript(this, this.GetType(), "Mse", "ChkCCM();", true);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)