Esempio n. 1
0
        /// <summary>
        /// Logs an error to the database.
        /// </summary>
        /// <remarks>
        /// Use the stored procedure called by this implementation to set a
        /// policy on how long errors are kept in the log. The default
        /// implementation stores all errors for an indefinite time.
        /// </remarks>

        public override string Log(Error error)
        {
            if (error == null)
            {
                throw new ArgumentNullException("error");
            }

            string errorXml = ErrorXml.EncodeString(error);
            Guid   id       = Guid.NewGuid();

            using (OracleConnection connection = new OracleConnection(this.ConnectionString))
                using (OracleCommand command = connection.CreateCommand())
                {
                    connection.Open();
                    using (OracleTransaction transaction = connection.BeginTransaction())
                    {
                        // because we are storing the XML data in a NClob, we need to jump through a few hoops!!
                        // so first we've got to operate within a transaction
                        command.Transaction = transaction;

                        // then we need to create a temporary lob on the database server
                        command.CommandText = "declare xx nclob; begin dbms_lob.createtemporary(xx, false, 0); :tempblob := xx; end;";
                        command.CommandType = CommandType.Text;

                        OracleParameterCollection parameters = command.Parameters;
                        parameters.Add("tempblob", OracleType.NClob).Direction = ParameterDirection.Output;
                        command.ExecuteNonQuery();

                        // now we can get a handle to the NClob
                        OracleLob xmlLob = (OracleLob)parameters[0].Value;
                        // create a temporary buffer in which to store the XML
                        byte[] tempbuff = Encoding.Unicode.GetBytes(errorXml);
                        // and finally we can write to it!
                        xmlLob.BeginBatch(OracleLobOpenMode.ReadWrite);
                        xmlLob.Write(tempbuff, 0, tempbuff.Length);
                        xmlLob.EndBatch();

                        command.CommandText = SchemaOwner + "pkg_elmah$log_error.LogError";
                        command.CommandType = CommandType.StoredProcedure;

                        parameters.Clear();
                        parameters.Add("v_ErrorId", OracleType.NVarChar, 32).Value = id.ToString("N");
                        parameters.Add("v_Application", OracleType.NVarChar, _maxAppNameLength).Value = ApplicationName;
                        parameters.Add("v_Host", OracleType.NVarChar, 30).Value     = error.HostName;
                        parameters.Add("v_Type", OracleType.NVarChar, 100).Value    = error.Type;
                        parameters.Add("v_Source", OracleType.NVarChar, 60).Value   = error.Source;
                        parameters.Add("v_Message", OracleType.NVarChar, 500).Value = error.Message;
                        parameters.Add("v_User", OracleType.NVarChar, 50).Value     = error.User;
                        parameters.Add("v_AllXml", OracleType.NClob).Value          = xmlLob;
                        parameters.Add("v_StatusCode", OracleType.Int32).Value      = error.StatusCode;
                        parameters.Add("v_TimeUtc", OracleType.DateTime).Value      = error.Time.ToUniversalTime();

                        command.ExecuteNonQuery();
                        transaction.Commit();
                    }
                    return(id.ToString());
                }
        }
Esempio n. 2
0
        public static List <ProductMaster> GetProductList()
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter(Common.CMS_SP_INSERT_PRODUCT_MST.P_OUTTBL, OracleType.Cursor));
            param[Common.CMS_SP_INSERT_PRODUCT_MST.P_OUTTBL].Direction = ParameterDirection.Output;
            OracleParameter[] Oraparam = new OracleParameter[param.Count];
            param.CopyTo(Oraparam, 0);
            param.Clear();
            var liProductMaster = (List <ProductMaster>)OracleHelper.FetchData <ProductMaster>(Oraparam, Common.Queries.CMS_SP_GET_PRODUCT_MST, EnumCommand.DataSource.list).DataSource.Data;

            return(liProductMaster);
        }
Esempio n. 3
0
        // public SelectList siSelectedList { get; set; }
        #endregion
        #region CompanyMaster Methods
        public static List <CompanyMaster> FetchCompanyMaster()
        {
            OracleParameterCollection param = new OracleParameterCollection();

            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 liCompanyMaster = (List <CompanyMaster>)OracleHelper.FetchData <CompanyMaster>(Oraparam, Common.Queries.CMS_SP_GET_COMPANTY_MST, EnumCommand.DataSource.list).DataSource.Data;

            return(liCompanyMaster);
        }
Esempio n. 4
0
        public static List <YardMaster> FetchYardMaster(YardMaster objModel)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter(Common.POS_SP_GET_YARD_CODE.P_OUTTBL, OracleType.Cursor));
            param[Common.POS_SP_GET_YARD_CODE.P_OUTTBL].Direction = ParameterDirection.Output;
            OracleParameter[] Oraparam = new OracleParameter[param.Count];
            param.CopyTo(Oraparam, 0);
            param.Clear();
            var liYardMaster = (List <YardMaster>)OracleHelper.FetchData <YardMaster>(Oraparam, Common.Queries.POS_SP_GET_YARD_CODE, EnumCommand.DataSource.list).DataSource.Data;

            return(liYardMaster);
        }
Esempio n. 5
0
        public static List <DashboardModel> FetchPOSMonthlyActualReport()
        {
            OracleParameterCollection param = new OracleParameterCollection();

            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 liPOSMonthlyPlan = (List <DashboardModel>)OracleHelper.FetchData <DashboardModel>(Oraparam, Common.Queries.POS_SP_MONTHLY_ACTUAL_REPORT, EnumCommand.DataSource.list).DataSource.Data;

            return(liPOSMonthlyPlan);
        }
Esempio n. 6
0
        public static List <UserMaster> GetTVSCSAreaList()
        {
            OracleParameterCollection param = new OracleParameterCollection();

            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 liTVSCSAreaCode = (List <UserMaster>)OracleHelper.FetchData <UserMaster>(Oraparam, Common.Queries.CMS_SP_GET_AREACODE_MST, EnumCommand.DataSource.list).DataSource.Data;

            return(liTVSCSAreaCode);
        }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
        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);
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
        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);
        }
Esempio n. 11
0
        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);
        }
Esempio n. 12
0
        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);
        }
Esempio n. 13
0
        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);
        }
Esempio n. 14
0
        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);
        }
Esempio n. 15
0
        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);
        }
Esempio n. 16
0
        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);
        }
Esempio n. 17
0
        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);
        }
Esempio n. 18
0
        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);
        }
Esempio n. 19
0
        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);
        }
Esempio n. 20
0
    // <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();
    }
Esempio n. 21
0
        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);
        }
Esempio n. 22
0
        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);
        }
Esempio n. 23
0
        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);
        }
Esempio n. 24
0
        public static List <ActionMaster> SaveActionMaster(ActionMaster actionmaster)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.E_KEY, actionmaster.KEY));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.E_ACTION_CODE, actionmaster.ACTION_CODE));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.E_ACTION_DESC, actionmaster.ACTION_DESC));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.E_ACTIVE, actionmaster.USER_ACTIVE));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_ACTION_MST.P_OUTTBL, OracleType.Cursor));
            param[Common.CMS_SP_INSERT_ACTION_MST.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_INSERT_ACTION_MST, EnumCommand.DataSource.list).DataSource.Data;

            return(liActionMaster);
        }
Esempio n. 25
0
        public static List <BillingMaster> FetchBillingMasterHRD(BillingMaster billingmaster)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter(Common.POS_SP_GET_BILLING_MASTER.P_KEY_CODE, billingmaster.KEY));
            param.Add(new OracleParameter(Common.POS_SP_GET_BILLING_MASTER.P_BANK_ID, billingmaster.BANK_ID));
            param.Add(new OracleParameter(Common.POS_SP_GET_BILLING_MASTER.P_CHRG_TYPE, billingmaster.CHARGE_TYPE));
            param.Add(new OracleParameter(Common.POS_SP_GET_BILLING_MASTER.P_PRODUCT, billingmaster.PRODUCT_ID));
            param.Add(new OracleParameter(Common.POS_SP_GET_BILLING_MASTER.P_OUT_TBL, OracleType.Cursor));
            param[Common.POS_SP_GET_BILLING_MASTER.P_OUT_TBL].Direction = ParameterDirection.Output;
            OracleParameter[] Oraparam = new OracleParameter[param.Count];
            param.CopyTo(Oraparam, 0);
            param.Clear();
            var liBillingMaster = (List <BillingMaster>)OracleHelper.FetchData <BillingMaster>(Oraparam, Common.Queries.POS_SP_GET_BILLING_MASTER, EnumCommand.DataSource.list).DataSource.Data;

            return(liBillingMaster);
        }
Esempio n. 26
0
        public static List <Notifications> UpdateNotifications(string sUserId, string sRole, string sNotificationId, string sIsBulk)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter("P_USER_ID", sUserId));
            param.Add(new OracleParameter("P_ROLE_CODE", sRole));
            param.Add(new OracleParameter("P_NOTIFICATION_ID", sNotificationId));
            param.Add(new OracleParameter("P_IS_BULK", sIsBulk));
            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_UPDATE_NOTIFICATION, EnumCommand.DataSource.list).DataSource.Data;

            return(liNotification);
        }
Esempio n. 27
0
        public static List <Notifications> GetAllNotifications(string LoginID, string sUserRole, string sLastLogin, string sIsNewUser)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter("P_USERID", LoginID));
            param.Add(new OracleParameter("P_ROLE_CODE", sUserRole));
            param.Add(new OracleParameter("P_LAST_LOGIN", sLastLogin));
            param.Add(new OracleParameter("P_IS_NEW_USER", sIsNewUser));
            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_ALL_NOTIFICATION, EnumCommand.DataSource.list).DataSource.Data;

            return(liNotification);
        }
Esempio n. 28
0
        public static List <BankMaster> SaveBankMaster(BankMaster bankmaster)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter(Common.POS_SP_INS_BANK_MASTER.P_KEY, bankmaster.KEY));
            param.Add(new OracleParameter(Common.POS_SP_INS_BANK_MASTER.P_BANK_NAME, bankmaster.BANK_DESC));
            param.Add(new OracleParameter(Common.POS_SP_INS_BANK_MASTER.P_BANK_CODE, bankmaster.BANK_CODE));
            param.Add(new OracleParameter(Common.POS_SP_INS_BANK_MASTER.P_BANK_TYPE, bankmaster.BANK_TYPE));
            param.Add(new OracleParameter(Common.POS_SP_INS_BANK_MASTER.P_ACTIVE, bankmaster.BANK_ACTIVE));
            param.Add(new OracleParameter(Common.POS_SP_INS_BANK_MASTER.P_OUT, OracleType.Cursor));
            param[Common.POS_SP_INS_BANK_MASTER.P_OUT].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.POS_SP_INS_BANK_MASTER, EnumCommand.DataSource.list).DataSource.Data;

            return(liBankMaster);
        }
Esempio n. 29
0
        public static List <RegionMaster> SaveRegionMaster(RegionMaster regionmaster)
        {
            OracleParameterCollection param1 = new OracleParameterCollection();

            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.E_KEY, regionmaster.KEY));
            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.E_CODE, regionmaster.REGION_CODE));
            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.E_CODE_DESC, regionmaster.REGION_DESC));
            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.E_ACTIVE, regionmaster.ACTIVE));
            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.E_ZONE_CODE, regionmaster.ZONE_CODE));
            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.E_CREATED_BY, regionmaster.CREATED_BY));
            param1.Add(new OracleParameter(Common.CMS_SP_REGZONCOLLECTION_MST.P_OUTTBL, OracleType.Cursor));
            param1[Common.CMS_SP_REGZONCOLLECTION_MST.P_OUTTBL].Direction = ParameterDirection.Output;
            OracleParameter[] Oraparam1 = new OracleParameter[param1.Count];
            param1.CopyTo(Oraparam1, 0);
            param1.Clear();
            var liRegionMaster1 = (List <RegionMaster>)OracleHelper.FetchData <RegionMaster>(Oraparam1, Common.Queries.CMS_SP_REGZONCOLLECTION_MST, EnumCommand.DataSource.list).DataSource.Data;

            return(liRegionMaster1);
        }
Esempio n. 30
0
        public static List <CompanyMaster> SaveCompanyMaster(CompanyMaster companymaster)
        {
            OracleParameterCollection param = new OracleParameterCollection();

            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.E_KEY, companymaster.KEY));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.E_COMPANY_CODE, companymaster.COMPANY_CODE));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.E_COMPANY_DESC, companymaster.COMPANY_NAME));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.E_CREATED_BY, companymaster.CREATED_BY));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.E_COMPANY_UPDATE_BY, companymaster.UPDATED_BY));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.E_ACTIVE, companymaster.COMP_ACTIVE));
            param.Add(new OracleParameter(Common.CMS_SP_INSERT_COMPANY_MST.P_OUTTBL, OracleType.Cursor));
            param[Common.CMS_SP_INSERT_COMPANY_MST.P_OUTTBL].Direction = ParameterDirection.Output;
            OracleParameter[] Oraparam = new OracleParameter[param.Count];
            param.CopyTo(Oraparam, 0);
            param.Clear();
            var liCompanyMaster = (List <CompanyMaster>)OracleHelper.FetchData <CompanyMaster>(Oraparam, Common.Queries.CMS_SP_INSERT_COMPANY_MST, EnumCommand.DataSource.list).DataSource.Data;

            return(liCompanyMaster);
        }