예제 #1
0
        /// <summary>
        /// This method is used to save voucher (Booklet)
        /// </summary>
        /// <param name="voucherInfo"></param>
        /// <param name="userId"></param>
        public static void SaveVoucherBooklet(VoucherInfo voucherInfo, string userId)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Voucher_CreateBooklet";
                ParameterCollection.Add(new clsParameter("@vouchertypeID", voucherInfo.vouchertypeId));
                ParameterCollection.Add(new clsParameter("@denomination", voucherInfo.voucherDenomination));
                ParameterCollection.Add(new clsParameter("@quantity", voucherInfo.quantity));
                ParameterCollection.Add(new clsParameter("@amountvalue", voucherInfo.priceAmount));
                ParameterCollection.Add(new clsParameter("@leaf", voucherInfo.leafQuantity));
                ParameterCollection.Add(new clsParameter("@userid", userId));
                ParameterCollection.Add(new clsParameter("@voucherValidateDate", voucherInfo.VoucherValidity));
                ParameterCollection.Add(new clsParameter("@isThirdparty", voucherInfo.isThirdparty));
                ParameterCollection.Add(new clsParameter("@salesValidateDate", voucherInfo.SalesValidity));
                ParameterCollection.Add(new clsParameter("@showDenomination", voucherInfo.showDenomination));
                ParameterCollection.Add(new clsParameter("@redeemStore", voucherInfo.RedeemStores));

                DataAccess.ExecuteNonQuerySp(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #2
0
        public int CheckPkgCountBeforeInsert(int PackageID, int UserID)
        {
            try
            {
                clsParameterCollection clsParaCollection = new clsParameterCollection();
                clsParaCollection.ProcedureName = Constants.VP_UserPackage_CheckPkgCountBeforeInsert;
                clsParaCollection.Add(new clsParameter { ParameterName = "@UserID", ParameterValue = UserID });
                clsParaCollection.Add(new clsParameter { ParameterName = "@PackageID", ParameterValue = PackageID });
                dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
                if (dt.Rows.Count > 0)
                {
                    return Convert.ToInt32(dt.Rows[0][0]);
                }
                else
                {
                    return 0;
                }

            }

            catch (Exception ex)
            {
                BL_Exception.WriteLog(ex);
                throw ex;
            }
        }
예제 #3
0
        public static void SaleVoucherSeries(string FirstID, string LastId, string RequestorName, string RequestorEmail, string RequestorPhone, string Amount, string UserId)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_SalesNew_SaleSeries";
                ParameterCollection.Add(new clsParameter("@VocStart", FirstID));
                ParameterCollection.Add(new clsParameter("@VocEnd", LastId));
                ParameterCollection.Add(new clsParameter("@UserID", UserId));
                ParameterCollection.Add(new clsParameter("@name", RequestorName));
                ParameterCollection.Add(new clsParameter("@EmailId", RequestorEmail));
                ParameterCollection.Add(new clsParameter("@phoneNumber", RequestorPhone));
                ParameterCollection.Add(new clsParameter("@TotalSalesAmout", Amount));


                DataAccess.ExecuteNonQuerySp(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #4
0
 public DataTable GetProofReadingUserData(string UserID)
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.sp_RetrieveProofReadingUserData;
         clsParaCollection.Add(new clsParameter("@UserID", UserID));
         return DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
     }
     catch (Exception Ex)
     {
         throw Ex;
     }
 }
예제 #5
0
        public DataTable getAllUsers()
        {
            try {
                clsParameterCollection clsParaCollection = new clsParameterCollection();
                clsParaCollection.ProcedureName = Constants.sp_GetAllUsers;
                dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
                return dt;

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #6
0
 public DataTable CheckUserActiveORNOT(string UserName)
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.sp_IsActive;
         clsParaCollection.Add(new clsParameter { ParameterName = "@UserName", ParameterValue = UserName });
         dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
         return dt;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #7
0
        public DataTable get_IRTemplateData()
        {
            try
            {
                clsParameterCollection clsParaCollection = new clsParameterCollection();
                clsParaCollection.ProcedureName = Constants.sp_RetrieveIllustrationTemplates;

                dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
                return dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #8
0
 public void BookAuthorInsert(DataTable dt)
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.VP_athor_book_Insert;
         clsParaCollection.Add(new clsParameter("@author_book", dt));
         DataAccess.ExecuteNonQuerySp(clsParaCollection);
     }
     catch (Exception ex)
     {
         BL_Exception.WriteLog(ex);
         throw ex;
     }
 }
예제 #9
0
 public static int GetUserId(string Email)
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.GetUserID;
         clsParaCollection.Add(new clsParameter("@Email", Email));
         return Convert.ToInt32(Convert.ToString(DataAccess.ExecuteSpAndGetDataTable(clsParaCollection).Rows[0]["userid"]));
     }
     catch (Exception ex)
     {
         BL_Exception.WriteLog(ex);
         throw ex;
     }
 }
예제 #10
0
 public DataTable get_Templates()
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.sp_getIRTemplateURL;
         dt.Reset();
         dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
         return dt;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #11
0
        public static string GetStateNameByStateId(int CityId)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_GetStateByStateId";
                ParameterCollection.Add(new clsParameter("@StateID", CityId));

                return DataAccess.ExecuteScalarSp(ParameterCollection).ToString();
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
예제 #12
0
 ///// <summary>
 ///// This is Used to calculate Estimated Amount based on input(Number of words)
 ///// </summary>
 ///// <param name="wCount"></param>
 ///// <returns></returns>
 //public string CalculateEstimateAmt(int wCount)
 //{
 //    try
 //    {
 //        clsParameterCollection clsParaCollection = new clsParameterCollection();
 //        clsParaCollection.ProcedureName = Constants.sp_CalculateEstimateAmt;
 //        clsParaCollection.Add(new clsParameter("@Wcont", wCount));
 //        dt.Reset();
 //        dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
 //        return dt.Rows[0][0].ToString();
 //    }
 //    catch (Exception ex)
 //    {
 //        BL_Exception.WriteLog(ex);
 //        throw ex;
 //    }
 //}
 /// <summary>
 /// This Method is used to Cancel service request (set status=Canceled on respective trnid)
 /// </summary>
 /// <param name="trnID"></param>
 public void Cancellation(int trnID)
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.Add(new clsParameter("@TrnID", trnID));
         clsParaCollection.ProcedureName = Constants.sp_CoverDesign_CancelRequest;
         DataAccess.ExecuteNonQuerySp(clsParaCollection);
     }
     catch (Exception ex)
     {
         BL_Exception.WriteLog(ex);
         throw ex;
     }
 }
예제 #13
0
        /// <summary>
        /// This method is used to get Redeemped vouchers.
        /// </summary>
        /// <returns></returns>
        public static DataTable GetVoucherOperationDetails(string ProcedureName)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = ProcedureName;
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #14
0
        public static DataTable GetStoreDetails()
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_EmployeeAllocation_FillStoreList";
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #15
0
        public static DataTable GetVendorList()
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_SalesNew2_GetVendorList";
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #16
0
        /// <summary>
        /// This method is used to get canceled vouchers
        /// </summary>
        /// <returns></returns>
        public static DataTable GetCancelledDetails()
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Cancellation_ShowVocuhers";
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #17
0
 /// <summary>
 /// This method retrieves all available formatting templates from VP_Templates table.
 /// </summary>
 /// <returns></returns>
 public DataTable get_FRTemplateData()
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.sp_RetrieveFormattingTemplates;
         dt.Reset();
         dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
         return dt;
     }
     catch (Exception ex)
     {
         BL_Exception.WriteLog(ex);
         throw ex;
     }
 }
예제 #18
0
        /// <summary>
        /// This method is used to get child menu details.
        /// </summary>
        /// <returns></returns>
        public static DataTable GetSubMenu(int MenuId)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_GetSubMenu";
                ParameterCollection.Add(new clsParameter("@MenuId", MenuId));
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #19
0
        public string GetUserName(ProofReading pr)
        {
            try
            {
                clsParameterCollection clsParaCollection = new clsParameterCollection();
                clsParaCollection.ProcedureName = Constants.sp_GetUserName;
                clsParaCollection.Add(new clsParameter("@TrnId", pr.PTran_ID));
                dt.Reset();
                dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
                return dt.Rows[0][0].ToString();

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #20
0
        public static void CancelRedemption(string UserID)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_RedemptionChange3Cancel";
                ParameterCollection.Add(new clsParameter("@UserID", UserID));
                DataAccess.ExecuteNonQuerySp(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #21
0
        public string CalculateEstimateAmt(int wCount)
        {
            try
            {
                clsParameterCollection clsParaCollection = new clsParameterCollection();
                clsParaCollection.ProcedureName = Constants.sp_CalculateEstimateAmt;
                clsParaCollection.Add(new clsParameter("@Wcont", wCount));
                dt.Reset();
                dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
                return dt.Rows[0][0].ToString();

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #22
0
        /// <summary>
        /// This method is used to get user details by email-id.
        /// </summary>
        /// <param name="txtEmail"></param>
        /// <returns></returns>
        public static DataTable GetEmailuser(string txtEmail)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "GetEmailuser";
                ParameterCollection.Add(new clsParameter("@EmailId", txtEmail));
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #23
0
        /// <summary>
        /// This method is used to get city's.
        /// </summary>
        /// <param name="StateID"></param>
        /// <returns></returns>
        public static DataTable FillCity(string StateID)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_ShowCity";
                ParameterCollection.Add(new clsParameter("@stateId", StateID));
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #24
0
        /// <summary>
        /// This method is used to Get all sold voucher details.
        /// </summary>
        /// <returns></returns>
        public static DataTable GetSoldVouchers(string UserID)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_Sales_ShowVouchers";
                ParameterCollection.Add(new clsParameter("@UserID", UserID));
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #25
0
        public static void fnUpdateStateList(int Id)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "GV_UpdateStateList";
                ParameterCollection.Add(new clsParameter("@StateId", Id));

                DataAccess.ExecuteNonQuerySp(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);
                throw Ex;
            }
        }
예제 #26
0
        /// <summary>
        /// This Method is used to show all store list.
        /// </summary>
        /// <param name="Drp"></param>
        public static DataTable FillStoreCode()
        {
            try
            {
                clsParameterCollection objStore = new clsParameterCollection();
                objStore.ProcedureName = "BS_InwardAtStore_FillStoreList";
                return DataAccess.ExecuteSpAndGetDataTable(objStore);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }

        }
예제 #27
0
        /// <summary>
        /// This method is used to get all store codes.
        /// </summary>
        /// <returns></returns>
        public static DataTable GetStoreCdoes(string LoginUserStore)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_StoreAllocation_FillStoreList";
                ParameterCollection.Add(new clsParameter("@StoreCode", LoginUserStore));
                return DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #28
0
 /// <summary>
 /// Fill DropDonw List
 /// </summary>
 /// <param name="Drp"></param>
 public static void FillDropDown(DropDownList Drp)
 {
     try
     {
         clsParameterCollection ParameterCollection = new clsParameterCollection();
         ParameterCollection.ProcedureName = "BS_VendorDiscount_FillVendorList";
         ParameterCollection.Add(new clsParameter("@StoreCode", 0));
         DataTable dt = DataAccess.ExecuteSpAndGetDataTable(ParameterCollection);
         DataAccess.FillDropDown(Drp, dt);
     }
     catch (Exception Ex)
     {
         if (!Ex.Message.Contains("User Define:"))
             BL_Exception.WriteLog(Ex);
         throw Ex;
     }
 }
예제 #29
0
        /// <summary>
        /// This method is used to save received vouchers/booklets.
        /// </summary>
        public static void SaveReceivedVouchers(string UserID)
        {
            try
            {
                clsParameterCollection ParameterCollection = new clsParameterCollection();
                ParameterCollection.ProcedureName = "BS_ReceivedatHO_ADDVoucher";
                ParameterCollection.ParaCollection.Add(new clsParameter("@UserID", UserID));
                DataAccess.ExecuteNonQuerySp(ParameterCollection);
            }
            catch (Exception Ex)
            {
                if (!Ex.Message.Contains("User Define:"))
                    BL_Exception.WriteLog(Ex);

                throw Ex;
            }
        }
예제 #30
0
 /// <summary>
 /// This Method is used to Check that partucular role has permisions assigned or not (Validation on ManagePermissions View on Assign button and Remove nutton click)
 /// </summary>
 /// <param name="RoleName"></param>
 /// <param name="ViewName"></param>
 /// <returns></returns>
 public DataTable checkPermissionForRole(string RoleName,string ViewName)
 {
     try
     {
         clsParameterCollection clsParaCollection = new clsParameterCollection();
         clsParaCollection.ProcedureName = Constants.sp_checkPermissionForRole;
         clsParaCollection.Add(new clsParameter { ParameterName="@RoleName",ParameterValue=RoleName});
         clsParaCollection.Add(new clsParameter { ParameterName="@ViewName",ParameterValue=ViewName});
         dt = DataAccess.ExecuteSpAndGetDataTable(clsParaCollection);
         return dt;
     }
     catch (Exception ex)
     {
         BL_Exception.WriteLog(ex);
         throw ex;
     }
 }