public DataSet ExecuteQuery(string ProcedureName, Layer01_Common.Common.Layer01_Constants.Str_Parameters[] ProcedureParameters) { bool IsConnection = false; if (this.mConnection != null) { if (this.mConnection.State == ConnectionState.Open) { IsConnection = true; } } if (!IsConnection) { this.Connect(); } //[-] SqlCommand Cmd = new SqlCommand(); SqlDataAdapter Adp = new SqlDataAdapter(); DataSet Ds = new DataSet(); try { Cmd.CommandType = System.Data.CommandType.StoredProcedure; Cmd.CommandText = ProcedureName; Cmd.CommandTimeout = CnsQueryTimeout; if (!Information.IsNothing(ProcedureParameters)) { foreach (Layer01_Common.Common.Layer01_Constants.Str_Parameters Inner_Obj in ProcedureParameters) { Cmd.Parameters.AddWithValue(Inner_Obj.Name, Inner_Obj.Value); } } Cmd.Transaction = this.mTransaction; Cmd.Connection = this.mConnection; Adp.SelectCommand = Cmd; Adp.Fill(Ds); } catch (Exception Ex) { throw Ex; } finally { Cmd.Dispose(); Cmd = null; Adp.Dispose(); Adp = null; if (!IsConnection) { this.Close(); } } return Ds; }
protected Int64 SetupPage_GetLookupDefault(DataTable Dt_Lookup, Layer01_Common.Common.Layer01_Constants.eLookup Lkp) { Int64 DefaultID = 0; DataRow[] ArrDr = Dt_Lookup.Select("LookupID = " + ((Int32)Lkp).ToString()); if (ArrDr.Length > 0) { DefaultID = Convert.ToInt64(Do_Methods.IsNull(ArrDr[0]["Lookup_DetailsID_Default"], 0)); } return DefaultID; }
protected override void Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType pPartyType, ClsSysCurrentUser pCurrentUser = null, string pTableName = "", string pViewName = "") { base.Setup(pPartyType, pCurrentUser, pTableName, pViewName); this.mObj_Person = new ClsPerson(this.mCurrentUser); }
public int ExecuteNonQuery(string ProcedureName, Layer01_Common.Common.Layer01_Constants.Str_Parameters[] ProcedureParameters) { bool IsConnection = false; if (this.mConnection != null) { if (this.mConnection.State == ConnectionState.Open) { IsConnection = true; } } if (!IsConnection) { this.Connect(); } //[-] SqlCommand Cmd = new SqlCommand(); int ReturnValue = 0; try { Cmd.CommandType = System.Data.CommandType.StoredProcedure; Cmd.CommandText = ProcedureName; Cmd.CommandTimeout = CnsQueryTimeout; if (!Information.IsNothing(ProcedureParameters)) { foreach (Layer01_Common.Common.Layer01_Constants.Str_Parameters Inner_Obj in ProcedureParameters) { Cmd.Parameters.AddWithValue(Inner_Obj.Name, Inner_Obj.Value); } } Cmd.Transaction = this.mTransaction; Cmd.Connection = this.mConnection; ReturnValue = Cmd.ExecuteNonQuery(); } catch { } finally { Cmd.Dispose(); Cmd = null; if (!IsConnection) { this.Close(); } } return ReturnValue; }
protected virtual void Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType pPartyType, ClsSysCurrentUser CurrentUser, String TableName, String ViewName = "", String CacheTableName = "") { base.Setup(CurrentUser, TableName, ViewName, CacheTableName); this.mObj_Party = new ClsParty(pPartyType, this.mCurrentUser); }
public void Setup( Layer01_Common.Common.Layer01_Constants.eSystem_Modules pSystem_ModulesID , ClsBase pObjBase , string pSystem_BindDefinition_Name , string pOverride_PageUrl_Details_New = "" , string pSource = "" , string pSourceKey = "" , bool pIsNoSelect = false , string pModuleName = "") { this.mSystem_ModulesID = (Int64)pSystem_ModulesID; this.mObj_Base = pObjBase; this.mSystem_BinDefinition_Name = pSystem_BindDefinition_Name; this.ViewState[CnsSystem_ModulesID] = pSystem_ModulesID; this.ViewState[CnsOverride_PageUrl_Details_New] = pOverride_PageUrl_Details_New; this.ViewState[CnsSystem_BindDefinition_Name] = pSystem_BindDefinition_Name; this.ViewState[CnsSource] = pSource; this.ViewState[CnsSourceKey] = pSourceKey; this.ViewState[CnsIsNoSelect] = pIsNoSelect; this.ViewState[CnsModuleName] = pModuleName; }
/// <summary> /// (Overridable) Loads the List with the supplied QueryCondition object /// </summary> /// <param name="Condition"> /// QueryCondition object to use /// </param> public virtual void Load(Layer01_Common.Objects.ClsQueryCondition Condition) { this.mDt_List = this.mDa.List(this.mHeader_ViewName, Condition); this.AddRequired(this.mDt_List); }
protected override void Setup(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType PartyType, ClsSysCurrentUser CurrentUser, String TableName, String ViewName = "", String CacheTableName = "") { base.Setup(PartyType, CurrentUser, TableName, ViewName); this.mObj_Person = new ClsPerson(this.mCurrentUser); }
public ClsParty(Layer01_Common.Common.Layer01_Constants.eSystem_LookupPartyType pPartyType, ClsSysCurrentUser pCurrentUser = null) { this.Setup(pCurrentUser,"Party"); this.mPartyType = pPartyType; }