/// <summary> /// Returns the specified error from the database, or null /// if it does not exist. /// </summary> public override ErrorLogEntry GetError(string id) { if (id == null) { throw new ArgumentNullException("id"); } if (id.Length == 0) { throw new ArgumentException(null, "id"); } Guid errorGuid; try { errorGuid = new Guid(id); } catch (FormatException e) { throw new ArgumentException(e.Message, "id", e); } string errorXml; using (OracleConnection connection = new OracleConnection(this.ConnectionString)) using (OracleCommand command = connection.CreateCommand()) { command.CommandText = SchemaOwner + "pkg_elmah$get_error.GetErrorXml"; command.CommandType = CommandType.StoredProcedure; OracleParameterCollection parameters = command.Parameters; parameters.Add("v_Application", OracleType.NVarChar, _maxAppNameLength).Value = ApplicationName; parameters.Add("v_ErrorId", OracleType.NVarChar, 32).Value = errorGuid.ToString("N"); parameters.Add("v_AllXml", OracleType.NClob).Direction = ParameterDirection.Output; connection.Open(); command.ExecuteNonQuery(); OracleLob xmlLob = (OracleLob)command.Parameters["v_AllXml"].Value; StreamReader streamreader = new StreamReader(xmlLob, Encoding.Unicode); char[] cbuffer = new char[1000]; int actual; StringBuilder sb = new StringBuilder(); while ((actual = streamreader.Read(cbuffer, 0, cbuffer.Length)) > 0) { sb.Append(cbuffer, 0, actual); } errorXml = sb.ToString(); } if (errorXml == null) { return(null); } Error error = ErrorXml.DecodeString(errorXml); return(new ErrorLogEntry(this, id, error)); }
public DataSet GetRichiedenti(string NomeCompleto) { OracleParameterCollection Coll = new OracleParameterCollection(); OracleParameter s_p_NomeCompleto = new OracleParameter(); s_p_NomeCompleto.ParameterName = "p_NomeCompleto"; s_p_NomeCompleto.OracleType = OracleType.VarChar; s_p_NomeCompleto.Direction = ParameterDirection.Input; s_p_NomeCompleto.Size = 50; s_p_NomeCompleto.Value = NomeCompleto; Coll.Add(s_p_NomeCompleto); OracleParameter s_Cursor = new OracleParameter(); s_Cursor.ParameterName = "IO_CURSOR"; s_Cursor.OracleType = OracleType.Cursor; s_Cursor.Direction = ParameterDirection.Output; Coll.Add(s_Cursor); DataSet _MyDs = base.GetData(Coll, "PACK_MAN_ORD.SP_GetRichiedenti_MB"); return(_MyDs); }
public DataSet GetIdBL(string bl_id) { string sql = "select bl.id as id from bl where bl.bl_id='" + bl_id + "'"; OracleParameterCollection Coll = new OracleParameterCollection(); OracleParameter s_p_sql = new OracleParameter(); s_p_sql.ParameterName = "p_sql"; s_p_sql.OracleType = OracleType.VarChar; s_p_sql.Direction = ParameterDirection.Input; s_p_sql.Size = 2000; s_p_sql.Value = sql; Coll.Add(s_p_sql); OracleParameter PaCursor = new OracleParameter(); PaCursor.ParameterName = "IO_CURSOR"; PaCursor.Direction = ParameterDirection.Output; PaCursor.OracleType = OracleType.Cursor; Coll.Add(PaCursor); DataSet _MyDs = base.GetData(Coll, "PACK_COMMON.SP_DYNAMIC_SELECT"); return(_MyDs); }
public DataSet GetDitteFornitoriRuoli(int idditta) { OracleParameterCollection Coll = new OracleParameterCollection(); OracleParameter s_id = new OracleParameter(); s_id.ParameterName = "p_Ditta_id"; s_id.OracleType = OracleType.Int32; s_id.Direction = ParameterDirection.Input; s_id.Value = idditta; Coll.Add(s_id); OracleParameter s_CurrentUser = new OracleParameter(); s_CurrentUser.ParameterName = "p_CurrentUser"; s_CurrentUser.OracleType = OracleType.VarChar; s_CurrentUser.Direction = ParameterDirection.Input; s_CurrentUser.Value = this.userName; Coll.Add(s_CurrentUser); OracleParameter PaCursor = new OracleParameter(); PaCursor.ParameterName = "IO_CURSOR"; PaCursor.Direction = ParameterDirection.Output; PaCursor.OracleType = OracleType.Cursor; Coll.Add(PaCursor); DataSet _MyDs = base.GetData(Coll, "PACK_DITTE.SP_GETGESTORI_FORNITORI_RUOLO"); return(_MyDs); }
public string GetNumeroApprovate(string _bl_id) { OracleParameterCollection _SColl = new OracleParameterCollection(); OracleParameter s_p_sql = new OracleParameter(); s_p_sql.ParameterName = "p_sql"; s_p_sql.OracleType = OracleType.VarChar; s_p_sql.Direction = ParameterDirection.Input; s_p_sql.Size = 2000; s_p_sql.Value = " Select count(wr.wr_id) from wr where wr.bl_id = '" + _bl_id + "' and wr.id_wr_status not in (1,15) and wr.tipomanutenzione_id = 1"; _SColl.Add(s_p_sql); OracleParameter s_Cursor = new OracleParameter(); s_Cursor.ParameterName = "IO_CURSOR"; s_Cursor.OracleType = OracleType.Cursor; s_Cursor.Direction = ParameterDirection.Output; _SColl.Add(s_Cursor); DataSet _MyDs = base.GetData(_SColl, "PACK_COMMON.SP_DYNAMIC_SELECT"); return(_MyDs.Tables[0].Rows[0][0].ToString()); }
public DataSet GetRDLApprovate(string codEdificio) { OracleParameterCollection _SColl = new OracleParameterCollection(); OracleParameter s_p_BL_ID = new OracleParameter(); s_p_BL_ID.ParameterName = "p_bl_id"; s_p_BL_ID.OracleType = OracleType.VarChar; s_p_BL_ID.Direction = ParameterDirection.Input; s_p_BL_ID.Size = 50; s_p_BL_ID.Value = codEdificio; _SColl.Add(s_p_BL_ID); OracleParameter s_Cursor = new OracleParameter(); s_Cursor.ParameterName = "IO_CURSOR"; s_Cursor.OracleType = OracleType.Cursor; s_Cursor.Direction = ParameterDirection.Output; _SColl.Add(s_Cursor); DataSet _MyDs = base.GetData(_SColl, "PACK_MAN_ORD.SP_GetRDLApprovate"); return(_MyDs); }
/// <summary> /// Returns a page of errors from the databse in descending order /// of logged time. /// </summary> public override int GetErrors(int pageIndex, int pageSize, IList <ErrorLogEntry> errorEntryList) { if (pageIndex < 0) { throw new ArgumentOutOfRangeException("pageIndex", pageIndex, null); } if (pageSize < 0) { throw new ArgumentOutOfRangeException("pageSize", pageSize, null); } using (OracleConnection connection = new OracleConnection(this.ConnectionString)) using (OracleCommand command = connection.CreateCommand()) { command.CommandText = _schemaOwner + "pkg_elmah$get_error.GetErrorsXml"; command.CommandType = CommandType.StoredProcedure; OracleParameterCollection parameters = command.Parameters; parameters.Add("v_Application", OracleType.NVarChar, _maxAppNameLength).Value = ApplicationName; parameters.Add("v_PageIndex", OracleType.Int32).Value = pageIndex; parameters.Add("v_PageSize", OracleType.Int32).Value = pageSize; parameters.Add("v_TotalCount", OracleType.Int32).Direction = ParameterDirection.Output; parameters.Add("v_Results", OracleType.Cursor).Direction = ParameterDirection.Output; connection.Open(); using (OracleDataReader reader = command.ExecuteReader()) { Debug.Assert(reader != null); if (errorEntryList != null) { while (reader.Read()) { var id = reader["ErrorId"].ToString(); var guid = new Guid(id); var error = new Error { ApplicationName = reader["Application"].ToString(), HostName = reader["Host"].ToString(), Type = reader["Type"].ToString(), Source = reader["Source"].ToString(), Message = reader["Message"].ToString(), User = reader["UserName"].ToString(), StatusCode = Convert.ToInt32(reader["StatusCode"]), Time = Convert.ToDateTime(reader["TimeUtc"]).ToLocalTime() }; errorEntryList.Add(new ErrorLogEntry(this, guid.ToString(), error)); } } reader.Close(); } return((int)command.Parameters["v_TotalCount"].Value); } }
private DataSet AggiornaWo(int itemId) { OracleParameterCollection Coll = new OracleParameterCollection(); Class.ClassCompletaOrdine _Completa = new Class.ClassCompletaOrdine(); CompletamentoUserControl user = (CompletamentoUserControl)pnlRisultati.Controls[0].Controls[0].FindControl("Completamento1"); DropDownList pcmbsAddetti0 = user.pcmbsAddetti0; int wo_id = itemId; OracleParameter p_wo_id = new OracleParameter(); p_wo_id.ParameterName = "p_wo_id"; p_wo_id.OracleType = OracleType.Int32; p_wo_id.Direction = ParameterDirection.Input; p_wo_id.Value = wo_id; Coll.Add(p_wo_id); OracleParameter p_addetto_id = new OracleParameter(); p_addetto_id.ParameterName = "p_addetto_id"; p_addetto_id.OracleType = OracleType.Int32; p_addetto_id.Direction = ParameterDirection.Input; p_addetto_id.Value = pcmbsAddetti0.SelectedValue; Coll.Add(p_addetto_id); DataSet Ds = _Completa.AggiornaWO(Coll); return(Ds); }
public static void Extract(OracleConnection connection, int resourceId, out Int64?globalId, out int?sprOborId) { var parameters = new OracleParameterCollection(); parameters.Add("p_resource_id", resourceId); parameters.Add("p_id_global", OracleDbType.VarChar).Direction = System.Data.ParameterDirection.Output; parameters.Add("p_obor_id", OracleDbType.Integer).Direction = System.Data.ParameterDirection.Output; GetPackage(connection).ExecuteProcedure("extract", parameters); var o = parameters["p_id_global"].Value; if (o == DBNull.Value) { globalId = null; } else { globalId = Convert.ToInt64(o); } o = parameters["p_obor_id"].Value; if (o == DBNull.Value) { sprOborId = null; } else { sprOborId = (int)o; } }
public static string KeyToWhere(IDataStoreKey key, OracleParameterCollection parameters) { string where = null; if (key is CounterDataStoreKey) { where = "T1.COUNTER = :CTR"; var par = new OracleParameter(); par.ParameterName = ":CTR"; par.Value = ((CounterDataStoreKey)key).Counter; parameters.Add(par); } else if (key is GDID) { where = "T1.GDID = :CTR"; var par = new OracleParameter(); par.ParameterName = ":CTR"; par.Value = key; parameters.Add(par); } else if (key is NameValueDataStoreKey) { var dict = key as NameValueDataStoreKey; var s = new StringBuilder(); var idx = 0; foreach (var e in dict) { s.AppendFormat(" (T1.\"{0}\" = :P{1}) AND", e.Key, idx); var par = new OracleParameter(); par.ParameterName = "?P" + idx.ToString(); par.Value = e.Value; parameters.Add(par); idx++; } if (s.Length > 0) { s.Remove(s.Length - 3, 3); //cut "AND" } where = s.ToString(); } else { throw new OracleDataAccessException(StringConsts.INVALID_KEY_TYPE_ERROR); } return(where); }
private bool IsAuthenticated(String user, String password) { //Check the values against forms authentication store. //return true; TheSite.AslMobile.Class.ClassUser _User = new TheSite.AslMobile.Class.ClassUser(); //Creazione Della Collection di Parametri OracleParameterCollection Coll = new OracleParameterCollection(); //Creazione del Parametro Password OracleParameter PaPas = new OracleParameter(); PaPas.ParameterName = "p_Password"; PaPas.Size = 50; PaPas.Direction = ParameterDirection.Input; PaPas.OracleType = OracleType.VarChar; PaPas.Value = _User.EncryptMD5(password); Coll.Add(PaPas); //Creazione del Parametro Del Cursore OracleParameter PaCursor = new OracleParameter(); PaCursor.ParameterName = "IO_CURSOR"; PaCursor.Direction = ParameterDirection.Output; PaCursor.OracleType = OracleType.Cursor; Coll.Add(PaCursor); //Creazione del Parametro User OracleParameter PaUser = new OracleParameter(); PaUser.ParameterName = "p_UserName"; PaUser.OracleType = OracleType.VarChar; PaUser.Size = 50; PaUser.Direction = ParameterDirection.Input; PaUser.Value = user; Coll.Add(PaUser); try { int result = _User.Autentica(Coll); if (result > 0) { return(true); } else { return(false); } } catch (Exception ex) { Console.WriteLine(ex.Message); return(false); } }
public DataSet GetAddetti(string NomeCompleto, string codEdificio, string ditta_id) { OracleParameterCollection _SColl = new OracleParameterCollection(); OracleParameter s_p_NomeCompleto = new OracleParameter(); s_p_NomeCompleto.ParameterName = "p_NomeCompleto"; s_p_NomeCompleto.OracleType = OracleType.VarChar; s_p_NomeCompleto.Direction = ParameterDirection.Input; s_p_NomeCompleto.Size = 50; s_p_NomeCompleto.Value = NomeCompleto; _SColl.Add(s_p_NomeCompleto); OracleParameter s_p_BL_ID = new OracleParameter(); s_p_BL_ID.ParameterName = "p_bl_id"; s_p_BL_ID.OracleType = OracleType.VarChar; s_p_BL_ID.Direction = ParameterDirection.Input; s_p_BL_ID.Size = 50; s_p_BL_ID.Value = codEdificio; _SColl.Add(s_p_BL_ID); OracleParameter s_p_DITTA_ID = new OracleParameter(); s_p_DITTA_ID.ParameterName = "p_ditta_id"; s_p_DITTA_ID.OracleType = OracleType.VarChar; s_p_DITTA_ID.Direction = ParameterDirection.Input; s_p_DITTA_ID.Size = 50; s_p_DITTA_ID.Value = ditta_id; _SColl.Add(s_p_DITTA_ID); OracleParameter s_p_UserName = new OracleParameter(); s_p_UserName.ParameterName = "p_UserName"; s_p_UserName.OracleType = OracleType.VarChar; s_p_UserName.Direction = ParameterDirection.Input; s_p_UserName.Size = 50; s_p_UserName.Value = this.UserName; _SColl.Add(s_p_UserName); OracleParameter s_Cursor = new OracleParameter(); s_Cursor.ParameterName = "IO_CURSOR"; s_Cursor.OracleType = OracleType.Cursor; s_Cursor.Direction = ParameterDirection.Output; _SColl.Add(s_Cursor); DataSet _MyDs = base.GetData(_SColl, "PACK_ADDETTI.SP_GETADDETTORUOLO"); return(_MyDs); }
public static List <BankMaster> FetchBankMasterBankType(BankMaster objBankdet) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_SP_GET_GCM_DET.P_IN_CODE, objBankdet.KEY)); param.Add(new OracleParameter(Common.POS_SP_GET_GCM_DET.P_OUTTBL, OracleType.Cursor)); param[Common.POS_SP_GET_GCM_DET.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var dafdafs = (List <BankMaster>)OracleHelper.FetchData <BankMaster>(Oraparam, Common.Queries.POS_SP_GET_GCM_DET, EnumCommand.DataSource.list).DataSource.Data; return(dafdafs); }
public static List <UserMaster> GetRoleList() { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_INSERT_USER_MANAGER.E_KEY, Common.Keys.RoleKey)); param.Add(new OracleParameter(Common.CMS_SP_INSERT_USER_MANAGER.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_INSERT_USER_MANAGER.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liRoleList = (List <UserMaster>)OracleHelper.FetchData <UserMaster>(Oraparam, Common.Queries.CMS_SP_GET_ROLE_LIST, EnumCommand.DataSource.list).DataSource.Data; return(liRoleList); }
public static List <BankMaster> FetchBankMasterByZoneKey(BankMaster bankmaster) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_INSERT_RESULT_MST.E_KEY, bankmaster.KEY)); param.Add(new OracleParameter(Common.CMS_SP_INSERT_RESULT_MST.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_INSERT_RESULT_MST.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liBankMaster = (List <BankMaster>)OracleHelper.FetchData <BankMaster>(Oraparam, Common.Queries.CMS_SP_GET_BANKZONREG_MST, EnumCommand.DataSource.list).DataSource.Data; return(liBankMaster); }
public static List <RoleMaster> FetchRoleMasterByRole(RoleMaster rolemaster) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_SP_FETCH_ROLE_LIST.E_ROLE_ID, rolemaster.ROLE_ID)); param.Add(new OracleParameter(Common.POS_SP_FETCH_ROLE_LIST.P_OUTTBL, OracleType.Cursor)); param[Common.POS_SP_FETCH_ROLE_LIST.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liRoleMaster = (List <RoleMaster>)OracleHelper.FetchData <RoleMaster>(Oraparam, Common.Queries.POS_SP_FETCH_MENU_BY_ROLE_ID, EnumCommand.DataSource.list).DataSource.Data; return(liRoleMaster); }
public static List <ActionMaster> FetchActionCodeAndDesc() { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.E_KEY, Common.ActiveLog.Inverse)); param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_INSERT_USER_MANAGER.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liActionMaster = (List <ActionMaster>)OracleHelper.FetchData <ActionMaster>(Oraparam, Common.Queries.CMS_SP_GET_ACTION_LIST, EnumCommand.DataSource.list).DataSource.Data; return(liActionMaster); }
public static List <RegionMaster> FetchRegionMaster(RegionMaster objModel) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_LIST.E_KEY, objModel.KEY)); param.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_LIST.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_REGZONCOLLECTION_LIST.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liRegionMaster = (List <RegionMaster>)OracleHelper.FetchData <RegionMaster>(Oraparam, Common.Queries.CMS_SP_REGZONCOLLECTION_LIST, EnumCommand.DataSource.list).DataSource.Data; return(liRegionMaster); }
public static List <BankMaster> FetchBankBranchMasterRegionZoneStateBankType(BankMaster objBankdet) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_LIST.E_KEY, objBankdet.DROPDOWNKEY)); param.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_LIST.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_REGZONCOLLECTION_LIST.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var dafdafs = (List <BankMaster>)OracleHelper.FetchData <BankMaster>(Oraparam, Common.Queries.CMS_SP_REGZONCOLLECTION_LIST, EnumCommand.DataSource.list).DataSource.Data; return(dafdafs); }
public static List <RoleMaster> SaveRoleMaster(string XMLString) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_INSERT_RESULT_MST.E_KEY, XMLString)); param.Add(new OracleParameter(Common.CMS_SP_INSERT_RESULT_MST.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_INSERT_RESULT_MST.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liRoleMaster = (List <RoleMaster>)OracleHelper.FetchData <RoleMaster>(Oraparam, Common.Queries.CMS_SP_INSERT_RESULT_MST, EnumCommand.DataSource.list).DataSource.Data; return(liRoleMaster); }
public static List <User> FetchExternalUserDetails(UserDetails objUserDetails) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.CMS_SP_INSERT_USER_MANAGER.E_USER_ID, objUserDetails.E_USER_ID)); param.Add(new OracleParameter(Common.CMS_SP_INSERT_USER_MANAGER.P_OUTTBL, OracleType.Cursor)); param[Common.CMS_SP_INSERT_USER_MANAGER.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liBranch = (List <User>)OracleHelper.FetchData <User>(Oraparam, Common.Queries.CMS_SP_CHECK_EXTERNAL_USER, EnumCommand.DataSource.list).DataSource.Data; return(liBranch); }
public bool TJSave(string string_1, string string_2, string string_3, object object_0) { bool flag = true; OracleCommand oracleCommand = null; OracleParameterCollection parameters = null; OracleConnection oracleConnection = new OracleConnection(this.string_0); string str = "INSERT INTO D_TJXX (TJLX, TJMC,OTFBH,TJ) Values (:TJLX,:TJMC,:OTFBH,:TJ)"; try { try { oracleConnection.Open(); if (oracleConnection.State == ConnectionState.Open) { oracleCommand = new OracleCommand(str, oracleConnection); parameters = oracleCommand.Parameters; parameters.Add(":TJLX", OracleType.NVarChar); parameters[":TJLX"].Direction = ParameterDirection.Input; parameters.Add(":TJMC", OracleType.NVarChar); parameters[":TJMC"].Direction = ParameterDirection.Input; parameters.Add(":OTFBH", OracleType.NVarChar); parameters[":OTFBH"].Direction = ParameterDirection.Input; parameters.Add(":TJ", OracleType.Blob); parameters[":TJ"].Direction = ParameterDirection.Input; parameters[":TJLX"].Value = string_1; parameters[":TJMC"].Value = string_2; parameters[":OTFBH"].Value = string_3; parameters[":TJ"].Value = object_0; oracleCommand.ExecuteNonQuery(); } } catch (Exception exception) { flag = false; } } finally { if (oracleCommand != null) { oracleCommand.Dispose(); } if (oracleConnection.State == ConnectionState.Open) { oracleConnection.Dispose(); } } return(flag); }
public static List <Branch> FetchBranchCode(UserDetails objUserDetails) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_SP_FETCH_BRANCH.P_USERID, objUserDetails.E_USER_ID)); param.Add(new OracleParameter(Common.POS_SP_FETCH_BRANCH.P_OUTTBL, OracleType.Cursor)); param[Common.POS_SP_FETCH_BRANCH.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liBranch = (List <Branch>)OracleHelper.FetchData <Branch>(Oraparam, Common.Queries.POS_SP_FETCH_BRANCH, EnumCommand.DataSource.list).DataSource.Data; return(liBranch); }
public static List <User> UpdateLastLogin(User user) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_SP_FETCH_BRANCH.P_USERID, user.USER_ID)); param.Add(new OracleParameter(Common.POS_SP_FETCH_BRANCH.P_OUTTBL, OracleType.Cursor)); param[Common.POS_SP_FETCH_BRANCH.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liUser = (List <User>)OracleHelper.FetchData <User>(Oraparam, Common.Queries.POS_SP_UPDATE_LAST_LOGIN, EnumCommand.DataSource.list).DataSource.Data; return(liUser); }
public static List <MenuItems> FetchUserMenu(UserDetails objUserDetails) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter("E_USERID", objUserDetails.E_USER_ID)); param.Add(new OracleParameter("P_OUTTBL1", OracleType.Cursor)); param["P_OUTTBL1"].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liUserMenu = (List <MenuItems>)OracleHelper.FetchData <MenuItems>(Oraparam, Common.Queries.CMS_SP_FETCH_MENUS_USER_WISE, EnumCommand.DataSource.list).DataSource.Data; return(liUserMenu); }
public static List <EmployeeMaster> GetEmployeeList() { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_SP_GET_EMP_MAST.P_KEY, Common.Keys.GENERAL)); param.Add(new OracleParameter(Common.POS_SP_GET_EMP_MAST.P_OUTTBL, OracleType.Cursor)); param[Common.POS_SP_GET_EMP_MAST.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liEmployeeList = (List <EmployeeMaster>)OracleHelper.FetchData <EmployeeMaster>(Oraparam, Common.Queries.POS_SP_GET_EMP_MAST, EnumCommand.DataSource.list).DataSource.Data; return(liEmployeeList); }
// <Snippet1> public void CreateOracleParamColl(OracleCommand command) { OracleParameterCollection paramCollection = command.Parameters; paramCollection.Add("pDName", OracleType.VarChar); paramCollection.Add("pLoc", OracleType.VarChar); string parameterNames = ""; for (int i = 0; i < paramCollection.Count; i++) { parameterNames += paramCollection[i].ToString() + "\n"; } Console.WriteLine(parameterNames); paramCollection.Clear(); }
public static List <Notifications> GetOverAllNotifications(Notifications objnotifications) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter("P_USERID", objnotifications.USER_ID)); param.Add(new OracleParameter("P_ROLE_CODE", objnotifications.ROLE)); param.Add(new OracleParameter("P_OUTTBL", OracleType.Cursor)); param["P_OUTTBL"].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liNotification = (List <Notifications>)OracleHelper.FetchData <Notifications>(Oraparam, Common.Queries.POS_SP_OVERALL_NOTIFICATION, EnumCommand.DataSource.list).DataSource.Data; return(liNotification); }
public static List <AreaMaster> FetchAreaMaster() { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_SP_GET_AREAREGION_DTLS.P_AREA_CODE, "")); param.Add(new OracleParameter(Common.POS_SP_GET_AREAREGION_DTLS.P_REGION_CODE, "")); param.Add(new OracleParameter(Common.POS_SP_GET_AREAREGION_DTLS.P_AREA_NAME, "")); param.Add(new OracleParameter(Common.POS_SP_GET_AREAREGION_DTLS.P_OUTTBL, OracleType.Cursor)); param[Common.POS_SP_GET_AREAREGION_DTLS.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liAreaMaster = (List <AreaMaster>)OracleHelper.FetchData <AreaMaster>(Oraparam, Common.Queries.POS_SP_GET_AREAREGION_DTLS, EnumCommand.DataSource.list).DataSource.Data; return(liAreaMaster); }
public static List <DashboardModel> FetchPOSMonthlyCount(DashboardModel DashboardModel) { OracleParameterCollection param = new OracleParameterCollection(); param.Add(new OracleParameter(Common.POS_MONTHLY_COUNT.P_USER_ROLE, HttpContext.Current.Session[Common.SESSION_VARIABLES.ROLE_CODE].ToString())); param.Add(new OracleParameter(Common.POS_MONTHLY_COUNT.P_USER_ID, HttpContext.Current.Session[Common.SESSION_VARIABLES.USER_ID].ToString())); param.Add(new OracleParameter(Common.POS_MONTHLY_COUNT.P_MONTH, DashboardModel.MONTH_YEAR)); param.Add(new OracleParameter(Common.POS_MONTHLY_COUNT.P_OUTTBL, OracleType.Cursor)); param[Common.POS_MONTHLY_COUNT.P_OUTTBL].Direction = ParameterDirection.Output; OracleParameter[] Oraparam = new OracleParameter[param.Count]; param.CopyTo(Oraparam, 0); param.Clear(); var liCompanyMaster = (List <DashboardModel>)OracleHelper.FetchData <DashboardModel>(Oraparam, Common.Queries.POS_SP_MONTHLY_COUNT, EnumCommand.DataSource.list).DataSource.Data; return(liCompanyMaster); }