protected void chkListMainMenu_SelectedIndexChanged(object sender, EventArgs e) { lblMsg.Text = ""; lblMsg.CssClass = ""; try { DataTable dt = CLSCommon.CallApiGetdt("api/MenuAllotment/FillSubMenu?Ind=4&MainMenuId=" + chkListMainMenu.SelectedValue); if (dt != null) { if (dt.Rows.Count > 0) { chkListSubMenu.DataSource = dt; chkListSubMenu.DataTextField = "SubMenuDesc"; chkListSubMenu.DataValueField = "SubMenuId"; chkListSubMenu.DataBind(); } else { ShowMessage("Sub Menu Are Not Available", false); chkListSubMenu.Items.Clear(); } } } catch { } }
protected void ddlUserLevel_SelectedIndexChanged(object sender, EventArgs e) { lblMsg.Text = ""; lblMsg.CssClass = ""; try { DataTable dt = CLSCommon.CallApiGetdt("api/MenuAllotment/FillClient_CA_Arti?Ind=2&CaCode=" + Session["CaCode"].ToString() + "&CaCodeOdp=" + Session["CaCodeOdp"].ToString() + "&UserLevel=" + ddlUserLevel.SelectedValue.ToString()); if (dt != null) { if (dt.Rows.Count > 0) { ViewState["grdData"] = null; gvData.DataSource = null; gvData.DataBind(); ddlClient_Ca_Arti.DataSource = dt; ddlClient_Ca_Arti.DataTextField = "ClientNameE"; ddlClient_Ca_Arti.DataValueField = "ClientCode"; ddlClient_Ca_Arti.DataBind(); ddlClient_Ca_Arti.Items.Insert(0, new ListItem("-- Select --", "0")); } else { ddlClient_Ca_Arti.Items.Clear(); chkListMainMenu.Items.Clear(); } } } catch { } }
void DeleteData(int Ind) { // DropDownList ddl = (DropDownList)wucTaxPayerStrip.FindControl("ddlMonthYear"); DataTable dt = CLSCommon.CallApiGetdt("api/DeleteClientData/DeleteData?Ind=" + Ind.ToString() + "&ClientCode=" + Session["ClientCode"].ToString() + "&ClientCodeOdp=" + Session["ClientCodeOdp"].ToString() + "&GSTIN=" + Session["ClientGSTNNO"].ToString() + "&MonthCD=" + Session["MonthYrCode"].ToString() + "&CaCode=" + Session["CaCode"].ToString() + "&CaCodeOdp=" + Session["CaCodeOdp"].ToString()); if (dt != null) { if (dt.Rows.Count > 0) { lblMsg.Text = "Data Deleted Successfully."; } } }
void CheckSession() { DataTable dt = CLSCommon.CallApiGetdt("api/UserSession/CheckUserSession?Ind=1&ClientCode=" + Session["ClientCode"].ToString() + "&ClientCodeOdp=" + Session["ClientCodeOdp"].ToString() + "&GSTIN=" + Session["ClientGSTNNo"].ToString()); if (dt != null) { if (dt.Rows[0]["res"].ToString() == "1") { hfLogId.Value = dt.Rows[0]["LogId"].ToString(); lblSuccess.InnerText = "Status : Connected. ";// +System.Environment.NewLine + " Remaining Time : " + dt.Rows[0]["Remaining"].ToString(); // lblRemaining.Visible = true; Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "$(document).ready(function(){RemainingTime(" + dt.Rows[0]["Remaining"].ToString() + ")});", true); // lblRemaining.Text = " Remaining Time : " + dt.Rows[0]["Remaining"].ToString(); divOTP.Enabled = false; divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success"); // divSaveTOGSTN.Visible = true; // pnlFile.Visible = true; //divSubmit.Visible = true; //divSummary.Visible = true; divOTP.Visible = true; divOTPSuccess.Style.Add("display", "block"); divGetLedger.Visible = true; // divSaveTOGSTN.Visible = true; btnConnectTOGSTIN.Attributes.Add("disabled", "disabled");// = false; } else { divOTPSuccess.Style.Add("display", "none"); lblSuccess.InnerText = ""; divOTP.Enabled = true; divGetLedger.Visible = false; divOTPSuccess.Attributes.Add("class", "col-sm-12 col-xs-12 alert alert-success success"); //divSaveTOGSTN.Visible = false; // pnlFile.Visible = false; // divSubmit.Visible = false; // divSummary.Visible = false; // divSaveTOGSTN.Visible = false; divOTP.Visible = false; btnConnectTOGSTIN.Attributes.Remove("disabled");// btnConnectTOGSTIN.Enabled = true; } } }
protected void FillUserLevel() { lblMsg.Text = ""; lblMsg.CssClass = ""; try { DataTable dt = CLSCommon.CallApiGetdt("api/MenuAllotment/FillUserLevel?Ind=1"); if (dt != null) { if (dt.Rows.Count > 0) { ddlUserLevel.DataSource = dt; ddlUserLevel.DataTextField = "LevelDesc"; ddlUserLevel.DataValueField = "LevelId"; ddlUserLevel.DataBind(); ddlUserLevel.Items.Insert(0, new ListItem("-- Select --", "0")); } } } catch { } }
protected void ddlClient_Ca_Arti_SelectedIndexChanged(object sender, EventArgs e) { try { DataTable dt = CLSCommon.CallApiGetdt("api/MenuAllotment/FillMenu?Ind=3&UserLevel=" + ddlUserLevel.SelectedValue.ToString()); if (dt != null) { if (dt.Rows.Count > 0) { ViewState["grdData"] = null; gvData.DataSource = null; gvData.DataBind(); chkListMainMenu.DataSource = dt; chkListMainMenu.DataTextField = "MenuDesc"; chkListMainMenu.DataValueField = "MenuId"; chkListMainMenu.DataBind(); menuPanel.Visible = true; } } } catch { } }