public DataTable GetAllCategories(DropDownList ddlKCC) { DataSet ds = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", "GET_KCC"), }; ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspKnowledgeCenter", sqlParamG); ddlKCC.DataSource = ds.Tables[0].Select("Active_flag=1").CopyToDataTable(); ddlKCC.DataTextField = "KCC_Desc"; ddlKCC.DataValueField = "KCC_SNo"; ddlKCC.DataBind(); ddlKCC.Items.Insert(0, new ListItem("Select", "0")); return(ds.Tables[0]); }
private void Bindgrid() { DataSet ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspResolutiontimeReport_MTO"); ds.Tables[0].Merge(ds.Tables[1]); gvReport.DataSource = ds; gvReport.DataBind(); }
private void Bindgrid() { DataSet ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "usp_AvgResolutionTimeReport_Percent_BRWise"); gvReport.DataSource = ds; gvReport.DataBind(); FindheaderTextAndHide(); }
public void BindFeedbackType(DropDownList ddl) { DataSet ds = new DataSet(); SqlParameter[] param = { new SqlParameter("@Type", "GET_FEEDBACK_TYPE") }; ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspShowFeedBack", param); ddl.DataSource = ds; ddl.DataValueField = "ID"; ddl.DataTextField = "Type"; ddl.DataBind(); ddl.Items.Insert(0, new ListItem("Select", "0")); ddl.Items.Remove(ddl.Items.FindByValue("7")); ds.Dispose(); }
public void BindCPISOnDivBase(DropDownList ddl) { SqlParameter[] param = { new SqlParameter("@UserName", this.UserName), new SqlParameter("@Type", this.Type) }; DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspCommonMISFunctions", param); if (ds != null) { ddl.DataTextField = "CPIS"; ddl.DataValueField = "CPIS"; ddl.DataSource = ds.Tables[0]; ddl.DataBind(); } }
public void GetUserSCs(DropDownList ddl, string Uid) { SqlParameter[] param = { // new SqlParameter("@Type","GETUSERSSCs_REGION_BRANCH"), new SqlParameter("@RegionSno", objDdl.RegionSno), new SqlParameter("@BranchSno", objDdl.BranchSno), new SqlParameter("@UserName", objDdl.EmpId) }; DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "usp_GetSCDetail", param); ddl.DataTextField = "SC_Name"; ddl.DataValueField = "SC_UserName"; ddl.DataSource = ds; ddl.DataBind(); ddlServicecontractorSearch.Items.Insert(0, new ListItem("All", "0")); }
protected void btnSearch_Click(object sender, EventArgs e) { sqlParamSrh[0].Value = int.Parse(Ddlyear.SelectedValue); sqlParamSrh[1].Value = int.Parse(ddlPg.SelectedItem.Value); DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "RptYearlyResolution", sqlParamSrh); gvComm.DataSource = ds; gvComm.DataBind(); //if (ds.Tables[0] != null) //{ // if (ds.Tables[0].Rows.Count > 0) // btnExportToExcel.Visible = true; //} foreach (GridViewRow gr in gvComm.Rows) { String status = "0"; foreach (TableCell tc in gr.Cells) { if (tc.Text == "Fan") { gr.Attributes.Add("pdno", "13"); } if (tc.Text == "Lighting") { gr.Attributes.Add("pdno", "14"); } if (tc.Text == "Appliances") { gr.Attributes.Add("pdno", "18"); } if (tc.Text == "Pump") { gr.Attributes.Add("pdno", "16"); } if (tc.Text == "FHP Motors") { gr.Attributes.Add("pdno", "19"); } if (tc.Text == "LT Motors") { gr.Attributes.Add("pdno", "15"); } status = gr.Attributes["pdno"]; int ci = gr.Cells.GetCellIndex(tc); if (status != null && ci == 1) { tc.Style.Add(HtmlTextWriterStyle.TextDecoration, "underline"); tc.Style.Add(HtmlTextWriterStyle.Cursor, "pointer"); tc.Attributes.Add("onclick", "window.open('YearlyResRptPopUp.aspx?Year=" + Ddlyear.SelectedValue + "&PdNo=" + gr.Attributes["pdno"] + "','ResolutionPopUp','height=250,width=600')"); } } } }
//Binding All users to usertype of co public void BindUsersToUserList(DropDownList ddlUsers, string strRole, string strType) { DataSet dsUsertype = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", strType), new SqlParameter("@RoleName", strRole) }; dsUsertype = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspEditUserAndRoleMaster", sqlParamG); ddlUsers.DataSource = dsUsertype; ddlUsers.DataTextField = "Name"; ddlUsers.DataValueField = "UserName"; ddlUsers.DataBind(); dsUsertype = null; ddlUsers.Items.Insert(0, new ListItem("Select a User", "0")); }
private void Bindgrid() { DataSet ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "usp_AvgResolutionTimeReport"); ds.Tables[0].Merge(ds.Tables[1]); gvReport.DataSource = ds; gvReport.DataBind(); FindheaderTextAndHide(); }
public void BindExecutiveName(DropDownList ddlEn) { DataSet dsEn = new DataSet(); SqlParameter[] sqlParamS = { new SqlParameter("@Type", "SELECT_EXECUTIVE_NAME") }; dsEn = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspDailyCallRegister", sqlParamS); ddlEn.DataSource = dsEn; ddlEn.DataTextField = "Name"; ddlEn.DataValueField = "UserName"; ddlEn.DataBind(); ddlEn.Items.Insert(0, new ListItem("Select", "")); dsEn = null; sqlParamS = null; }
public void BindQueryType(DropDownList ddl) { DataSet ds = new DataSet(); SqlParameter[] sqlParamS = { new SqlParameter("@Type", "SELECT_QUERYTYPE_FILL") }; //Getting values of Country to bind department drop downlist using SQL Data Access Layer ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspGeneralQueryReport", sqlParamS); ddl.DataSource = ds; ddl.DataTextField = "QueryType"; ddl.DataValueField = "QueryType"; ddl.DataBind(); ddl.Items.Insert(0, new ListItem("Select", "")); ds = null; sqlParamS = null; }
public void BindSCProductDivision(DropDownList ddl) { DataSet dsCity = new DataSet(); SqlParameter[] sqlParamS = { new SqlParameter("@SC_SNo", this.SCSNo), new SqlParameter("@Type", "FILLDDLPRODDIVONSCBASE") }; dsCity = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspBaseComDet", sqlParamS); ddl.DataSource = dsCity; ddl.DataTextField = "Unit_Desc"; ddl.DataValueField = "Unit_SNo"; ddl.DataBind(); ddl.Items.Insert(0, new ListItem("Select", "Select")); dsCity = null; sqlParamS = null; }
protected void BindGrid(string strOrder) { param[2].Value = int.Parse(ddlRegion.SelectedValue.ToString()); param[3].Value = int.Parse(ddlBranch.SelectedValue.ToString()); param[4].Value = int.Parse(ddlProductDivision.SelectedValue.ToString()); param[5].Value = int.Parse(ddlSC.SelectedValue.ToString()); param[7].Value = int.Parse(ddlBusinessLine.SelectedValue.ToString()); param[8].Value = int.Parse(ddlResolver.SelectedValue.ToString()); param[9].Value = ddlCGExec.SelectedValue.ToString(); param[10].Value = ddlCGContractEmp.SelectedValue.ToString(); ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspMIS2SCREEN", param); if (ds.Tables[0].Rows.Count != 0) { ds.Tables[0].Columns.Add("Total"); ds.Tables[0].Columns.Add("Sno"); intCommon = 1; intCommonCnt = ds.Tables[0].Rows.Count; for (int intCnt = 0; intCnt < intCommonCnt; intCnt++) { ds.Tables[0].Rows[intCnt]["Sno"] = intCommon; ds.Tables[0].Rows[intCnt]["Total"] = intCommonCnt; intCommon++; } gvMIS.DataSource = ds; gvMIS.DataBind(); } DataView dvSource = default(DataView); dvSource = ds.Tables[0].DefaultView; dvSource.Sort = strOrder; if ((ds != null)) { gvMIS.DataSource = dvSource; gvMIS.DataBind(); btnExport.Visible = true; lblCount.Text = ds.Tables[0].Rows.Count.ToString(); } else { btnExport.Visible = false; lblCount.Text = "0"; } }
public void GetUserRegionsByRoleMts(DropDownList ddl) { SqlParameter[] param = { new SqlParameter("@Type", "GETMTSREGION"), new SqlParameter("@UserName", this.EmpId), new SqlParameter("@Role", this.Role) }; DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "GetMisCommonFunctionOnRole", param); ddl.DataTextField = "Region_Desc"; ddl.DataValueField = "Region_SNo"; ddl.DataSource = ds; ddl.DataBind(); if (ddl.Items.Count > 1) { ddl.Items.Insert(0, new ListItem("All", "0")); } }
void BindReport(bool ShowHeader) { gvReport.ShowHeader = ShowHeader; DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "usp_ASCRoutingRpt"); gvReport.DataSource = ds; gvReport.DataBind(); GridView1.DataSource = ds.Tables[1]; GridView1.DataBind(); }
protected void btnSearch_Click(object sender, EventArgs e) { sqlParamSrh[0].Value = TxtContactNo.Text.Trim(); DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "SearchCustomerByContactNo", sqlParamSrh); lblCount.Text = ds.Tables[0].Rows.Count.ToString(); gvMIS.DataSource = ds; gvMIS.DataBind(); }
// Created By Bhawesh : 23-5-13 /// <summary> /// /// </summary> /// <param name="GvRpt"></param> public void BindRepeatedComplaintReport(GridView GvRpt) { SqlParameter[] sqlParamSrh = { new SqlParameter("@ProductDivisionSNo", this.ProductDivisionSNo), new SqlParameter("@RegionSNo", this.RegionSNo), new SqlParameter("@BranchSNo", this.BranchSNo), new SqlParameter("@FromDate", this.DateFrom), new SqlParameter("@ToDate", this.DateTo), new SqlParameter("@ProdSrNo", this.ProductSrNo), new SqlParameter("@Type", "REPEATEDCOMPLAINT_RPT") }; DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRepeatedComplaintRpt", sqlParamSrh); GvRpt.DataSource = ds; GvRpt.DataBind(); sqlParamSrh = null; ds = null; }
public DataSet GetFeedBackReponseSummaryReport() { DataSet ds = new DataSet(); sqlParamSrh[0].Value = this.Year; sqlParamSrh[1].Value = this.MonthFrom; sqlParamSrh[2].Value = this.MonthTo; ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspWebformResponseAggReport", sqlParamSrh); return(ds); }
protected void Page_Load(object sender, EventArgs e) { param[0].Value = Convert.ToInt32(Request.QueryString["RecID"]); if (param[0].Value != null) { ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "RptNewPopUp", param); gvMIS.DataSource = ds; gvMIS.DataBind(); } }
public void GetSCNo() { try { string SCUserName = Membership.GetUser().ToString(); SqlParameter[] sqlparam = { new SqlParameter("@Type", "SELECT_SC_SNO"), new SqlParameter("@SC_UserName", SCUserName) }; DataSet ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspBaseComDet", sqlparam); if (ds.Tables[0].Rows.Count != 0) { this.SC_SNo = int.Parse(ds.Tables[0].Rows[0]["SC_SNo"].ToString()); this.SC_Name = ds.Tables[0].Rows[0]["SC_Name"].ToString(); } } catch (Exception ex) { CommonClass.WriteErrorErrFile(HttpContext.Current.Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
public void BindCategoryOnSrNO() { DataSet ds = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", "SELECT_KCC_BYSR"), new SqlParameter("@KCC_SNo", this.KCC_SNo) }; ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspKnowledgeCenter", sqlParamG); if (ds.Tables[0] != null) { this.KCC_Desc = Convert.ToString(ds.Tables[0].Rows[0]["KCC_Desc"]); this.ActiveFlag = Convert.ToBoolean(ds.Tables[0].Rows[0]["Active_Flag"]); this.Status = Convert.ToString(ds.Tables[0].Rows[0]["Status"]); this.PLineStatus = Convert.ToString(ds.Tables[0].Rows[0]["PLineStatus"]); } }
/// <summary> /// Get Message /// </summary> /// <returns></returns> public DataSet GetMessage() { DataSet dsAction = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", this.Type) }; return(dsAction = objSql.ExecuteDataset(CommandType.StoredProcedure, "RevicePostNotification", sqlParamG)); }
public void BindSCInfo(GridView gv) { DataSet ds = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Unit_SNo", ProductDivSno), new SqlParameter("@ProductLine_SNo", ProductLineSno), new SqlParameter("@State_SNo", StateSNo), new SqlParameter("@City_SNo", CitySNo) }; ds = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspSCLocator", sqlParamG); if (ds.Tables[0] != null) { gv.DataSource = ds; gv.DataBind(); } ds = null; }
public DataTable GetData() { sqlParamS[0].Value = Membership.GetUser().UserName; DataSet ds = new DataSet(); ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "usp_dashBoardBranchSCWise", sqlParamS); DataTable dt = ds.Tables[0]; return(dt); }
public void BindDefectOnSNo(int intCapacitorSNo, string strType) { DataSet dsDefect = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", strType), new SqlParameter("@Ident_Sno", intCapacitorSNo) }; dsDefect = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspBladeVendorMaster", sqlParamG); if (dsDefect.Tables[0].Rows.Count > 0) { Ident_Sno = int.Parse(dsDefect.Tables[0].Rows[0]["Ident_Sno"].ToString()); DefectSNo = int.Parse(dsDefect.Tables[0].Rows[0]["Defect_SNo"].ToString()); ProductLineSNo = int.Parse(dsDefect.Tables[0].Rows[0]["ProductLine_SNo"].ToString()); DefectCategorySNo = int.Parse(dsDefect.Tables[0].Rows[0]["Defect_Category_SNo"].ToString()); VendorName = Convert.ToString(dsDefect.Tables[0].Rows[0]["BladeVendor"].ToString()); VendorSymbol = Convert.ToString(dsDefect.Tables[0].Rows[0]["Identification"].ToString()); ActiveFlag = dsDefect.Tables[0].Rows[0]["Active_Flag"].ToString(); WindingUnit = Convert.ToString(dsDefect.Tables[0].Rows[0]["WindingUnit"].ToString()); // Added by Gaurav Garg on 20 OCT 09 For MTO if (dsDefect.Tables[0].Rows[0]["Unit_Sno"].ToString() == "") { Unit_Sno = 0; } else { Unit_Sno = int.Parse(dsDefect.Tables[0].Rows[0]["Unit_Sno"].ToString()); } if (dsDefect.Tables[0].Rows[0]["BusinessLine_Sno"].ToString() == "") { Businessline_Sno = 0; } else { Businessline_Sno = int.Parse(dsDefect.Tables[0].Rows[0]["BusinessLine_Sno"].ToString()); } } dsDefect = null; }
public void BindDataGrid(GridView gv, string strProcOrQuery, bool isProc, SqlParameter[] sqlParam, Label lblRowCount) { DataSet ds = new DataSet(); if (ds != null) { ds = null; } ds = new DataSet(); if (isProc) { ds = objSql.ExecuteDataset(CommandType.StoredProcedure, strProcOrQuery, sqlParam); } else { ds = objSql.ExecuteDataset(CommandType.Text, strProcOrQuery, sqlParam); } if (ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Columns.Add("Total"); ds.Tables[0].Columns.Add("Sno"); intCommon = 1; intCommonCnt = int.Parse(ds.Tables[0].Rows.Count.ToString()); lblRowCount.Text = Convert.ToString(intCommonCnt); for (intCnt = 0; intCnt < intCommonCnt; intCnt++) { ds.Tables[0].Rows[intCnt]["Sno"] = intCommon; ds.Tables[0].Rows[intCnt]["Total"] = intCommonCnt; intCommon++; } } else { lblRowCount.Text = "0"; } gv.DataSource = ds; gv.DataBind(); ds = null; }
public DataSet GetASCEng(string ddl, int SCSno) { SqlDataAccessLayer objSqlDataAccessLayer = new SqlDataAccessLayer(); SqlParameter[] param = { new SqlParameter("@Type", "GetServiceEng"), new SqlParameter("@SC_SNO", SCSno) }; ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspCommonMISFunctions", param); return(ds); }
public void BindSbuonSNo(int intSbuSno, string strType) { DataSet dsSBU = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", strType), new SqlParameter("@SBU_SNo", intSbuSno) }; dsSBU = objSql.ExecuteDataset(CommandType.StoredProcedure, "uspSBUMaster", sqlParamG); if (dsSBU.Tables[0].Rows.Count > 0) { SbuSno = int.Parse(dsSBU.Tables[0].Rows[0]["SBU_SNo"].ToString()); SbuCode = dsSBU.Tables[0].Rows[0]["SBU_Code"].ToString(); SbuDesc = dsSBU.Tables[0].Rows[0]["SBU_Desc"].ToString(); CompanySno = int.Parse(dsSBU.Tables[0].Rows[0]["Company_SNo"].ToString()); ActiveFlag = dsSBU.Tables[0].Rows[0]["Active_Flag"].ToString(); } dsSBU = null; }
public void BindAllRegion(DropDownList ddlregion) { DataSet dsRegion = new DataSet(); SqlParameter[] sqlParamG = { new SqlParameter("@Type", "SELECT_REGION_FILL") }; dsRegion = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "uspRegionMaster", sqlParamG); if (dsRegion.Tables[0].Rows.Count > 0) { ddlregion.DataSource = dsRegion; ddlregion.DataTextField = "Region_Code"; ddlregion.DataValueField = "Region_SNo"; ddlregion.DataBind(); ddlregion.Items.Insert(0, new ListItem("Select", "0")); } dsRegion = null; sqlParamG = null; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { sqlParamSrh[0].Value = int.Parse(Request.QueryString["Year"]); sqlParamSrh[1].Value = int.Parse(Request.QueryString["PdNo"]); DataSet ds = objSqlDataAccessLayer.ExecuteDataset(CommandType.StoredProcedure, "RptYearlyResolutionPopUp", sqlParamSrh); gv.DataSource = ds; gv.DataBind(); } }