public DataSet getDataSet(ref tblAttributes objtblAttr) { DataSet objDataset = null; try { DBConnectionOpenDynamic(0); FillDataSetUsingCombo obj = new FillDataSetUsingCombo(); objDataset = obj.getDataSet(ref objtblAttr, con); } catch (Exception ex) { if (objtblAttr.strProc != "sp_getIUDErrorDetails") { saveErrorDetails(objtblAttr.strQuery, objtblAttr.strProc, returnStringFromArr(objtblAttr.strOutputStringArr), HttpContext.Current.Request.RawUrl, "dataset", ex.Message); } } finally { if (con != null) { if (con.State == ConnectionState.Open) { con.Close(); } } } return(objDataset); }
public string SaveUpdateDelete(ref tblAttributes objtblAttr, int IDAHO) { string intchk = "0"; try { DBConnectionOpenDynamic(IDAHO); SaveUpdateDelete obj = new SaveUpdateDelete(); intchk = obj.fn_SaveUpdateDelete(con, ref objtblAttr); } catch (Exception ex) { if (objtblAttr.strProc != "sp_getIUDErrorDetails") { saveErrorDetails(objtblAttr.strQuery, objtblAttr.strProc, returnStringFromArr(objtblAttr.strOutputStringArr), HttpContext.Current.Request.RawUrl, "SUD", ex.Message); } } finally { if (con != null) { if (con.State == ConnectionState.Open) { con.Close(); } } } return(intchk); }
public DataView getDataView(ref tblAttributes objtblAttr) { System.Data.DataView dv = new System.Data.DataView(); try { DBConnectionOpenDynamic(0); FillDataView obj = new FillDataView(); dv = obj.getDataView(ref objtblAttr, con); } catch (Exception ex) { if (objtblAttr.strProc != "sp_getIUDErrorDetails") { saveErrorDetails(objtblAttr.strQuery, objtblAttr.strProc, returnStringFromArr(objtblAttr.strOutputStringArr), HttpContext.Current.Request.RawUrl, "dataview", ex.Message); } } finally { if (con != null) { if (con.State == ConnectionState.Open) { con.Close(); } } } return(dv); }
public void FillCombo1(System.Web.UI.WebControls.DropDownList lst, ref tblAttributes objtblAttr, bool blnSelectAll, int intSelectedId, bool blnAutoPostBack) { SqlDataReader objReader = null; try { FillDataReader obj = new FillDataReader(); //If con Is Nothing Then DBConnectionOpenDynamic(0); //End If if ((objReader != null)) { if (objReader.IsClosed == false) { objReader.Close(); } } objReader = obj.fn_FillDataReader(ref objtblAttr, con); lst.AutoPostBack = blnAutoPostBack; lst.DataSource = objReader; lst.DataTextField = objtblAttr.strDisplayField; lst.DataValueField = objtblAttr.strValueField; lst.DataBind(); if (intSelectedId != 0) { lst.SelectedValue = Convert.ToString(intSelectedId); } if (blnSelectAll == true) { lst.Items.Insert(0, "-- Not Applicable --"); } } catch (Exception ex) { if (objtblAttr.strProc != "sp_getIUDErrorDetails") { saveErrorDetails(objtblAttr.strQuery, objtblAttr.strProc, returnStringFromArr(objtblAttr.strOutputStringArr), HttpContext.Current.Request.RawUrl, "fillcombo", ex.Message); } } finally { if (con != null) { if (con.State == ConnectionState.Open) { con.Close(); } } if (objReader != null) { if (objReader.IsClosed == false) { objReader.Close(); } } } }
public void FillRadioListBox(System.Web.UI.WebControls.RadioButtonList lst, ref tblAttributes objtblAttr, bool blnAutoPostBack, int intSelectedId) { SqlDataReader objReader = null; try { DBConnectionOpenDynamic(0); FillDataReader obj = new FillDataReader(); if ((objReader != null)) { if (objReader.IsClosed == false) { objReader.Close(); } } objReader = obj.fn_FillDataReader(ref objtblAttr, con); lst.AutoPostBack = blnAutoPostBack; if (intSelectedId != 0) { lst.SelectedValue = Convert.ToString(intSelectedId); } lst.DataSource = objReader; lst.DataTextField = objtblAttr.strDisplayField; lst.DataValueField = objtblAttr.strValueField; lst.RepeatColumns = objtblAttr.intColumn; //lst.RepeatDirection = objtblAttr.strRepeateDirection; lst.DataBind(); } catch (Exception ex) { if (objtblAttr.strProc != "sp_getIUDErrorDetails") { saveErrorDetails(objtblAttr.strQuery, objtblAttr.strProc, returnStringFromArr(objtblAttr.strOutputStringArr), HttpContext.Current.Request.RawUrl, "RLB", ex.Message); } } finally { if (con != null) { if (con.State == ConnectionState.Open) { con.Close(); } } if (objReader != null) { if (objReader.IsClosed == false) { objReader.Close(); } } } }
public void FillListBox(System.Web.UI.WebControls.ListBox lst, ref tblAttributes objtblAttr, bool blnAutoPostBack) { SqlDataReader objReader = null; try { FillDataReader obj = new FillDataReader(); DBConnectionOpenDynamic(0); if (objReader != null) { if (objReader.IsClosed == false) { objReader.Close(); } } objReader = obj.fn_FillDataReader(ref objtblAttr, con); lst.AutoPostBack = blnAutoPostBack; lst.DataSource = objReader; lst.DataTextField = objtblAttr.strDisplayField; lst.DataValueField = objtblAttr.strValueField; lst.DataBind(); } catch (Exception ex) { if (objtblAttr.strProc != "sp_getIUDErrorDetails") { saveErrorDetails(objtblAttr.strQuery, objtblAttr.strProc, returnStringFromArr(objtblAttr.strOutputStringArr), HttpContext.Current.Request.RawUrl, "LB", ex.Message); } } finally { if (con != null) { if (con.State == ConnectionState.Open) { con.Close(); } } if (objReader != null) { if (objReader.IsClosed == false) { objReader.Close(); } } } }
private void saveErrorDetails(string strQuery, string strProc, string strOP, string strURL, string strType, string strError) { try { tblAttributes objAttr = new tblAttributes(); String[] temp = new String[6]; if (strQuery != null) { temp[0] = strQuery; } else { temp[0] = ""; } if (strProc != null) { temp[1] = strProc; } else { temp[1] = ""; } if (strOP != null) { temp[2] = strOP; } else { temp[2] = ""; } if (strURL != null) { temp[3] = strURL; } else { temp[3] = ""; } if (strType != null) { temp[4] = strType; } else { temp[4] = ""; } if (strError != "") { temp[5] = strError; } else { temp[5] = ""; } objAttr.resizeArray(temp); objAttr.strProc = "sp_getIUDErrorDetails"; SaveUpdateDelete(ref objAttr); } catch { } }