Beispiel #1
0
        //for update mapping
        internal int GetAc_UpdateConfiguration(int Id, string OCode, string Company_Code, string ItemCode, string ItemName, string LedgerCode, string LedgerName, string ModuleId, string ModuleName, string TransactionNature, string ModuleType)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var Id_           = new SqlParameter("@Id", Id);
                    var OCode_        = new SqlParameter("@OCode", OCode);
                    var Company_Code_ = new SqlParameter("@Company_Code", Company_Code);

                    var ItemCode_ = new SqlParameter("@ItemCode", ItemCode);
                    var ItemName_ = new SqlParameter("@ItemName", ItemName);

                    var LedgerCode_        = new SqlParameter("@LedgerCode", LedgerCode);
                    var LedgerName_        = new SqlParameter("@LedgerName", LedgerName);
                    var ModuleId_          = new SqlParameter("@ModuleId", ModuleId);
                    var ModuleName_        = new SqlParameter("@ModuleName", ModuleName);
                    var TransactionNature_ = new SqlParameter("@TransactionNature", TransactionNature);
                    var ModuleType_        = new SqlParameter("@ModuleType", ModuleType);

                    string SP_SQL = "Conf_Get_UpdateConfiguration @Id,@OCode,@Company_Code,@ItemCode,@ItemName,@LedgerCode,@LedgerName,@ModuleId,@ModuleName,@TransactionNature,@ModuleType";
                    return(_context.ExecuteStoreCommand(SP_SQL, Id_, OCode_, Company_Code_, ItemCode_, ItemName_, LedgerCode_, LedgerName_, ModuleId_, ModuleName_, TransactionNature_, ModuleType_));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #2
0
        internal List <Category> getCategoryesById(string categorId, string OCODE)
        {
            try
            {
                int cId = Convert.ToInt32(categorId);
                //var categoryes = (from cate in _context.tbl_Category

                //                  where cate.OCODE == OCODE && cate.categoryId == cId
                //                  select cate);
                //return categoryes.ToList();

                using (var _context = new ERPSSL_AdminEntities1())
                {
                    return((from cate in _context.tbl_Category

                            where cate.OCODE == OCODE && cate.categoryId == cId

                            select new Category
                    {
                        CategoryName = cate.Name,
                        categoryid = (int)cate.categoryId
                    }).Distinct().ToList());
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
 internal IEnumerable <Category> GetCategoryForUserByModulId(int ModuleId, string Ocode, Guid usrerId)
 {
     using (var _context = new ERPSSL_AdminEntities1())
     {
         return((from uA in _context.tbl_UserAccess
                 join c in _context.tbl_Category on uA.CategoryId equals c.categoryId
                 where uA.ModuleId == ModuleId && uA.OCODE == Ocode && uA.UserID == usrerId && c.Status == true
                 select new Category
         {
             CategoryName = c.Name,
             categoryid = (int)uA.CategoryId,
             ID = (int)c.CategoryOrder
         }).Distinct().OrderBy(x => x.ID).ToList());
     }
 }
Beispiel #4
0
 internal List <RUserAccessRole> GetUserAccessInfoForDelete(string Ocode, string UserId)
 {
     try
     {
         using (var _context = new ERPSSL_AdminEntities1())
         {
             var    ParamempID  = new SqlParameter("@ocode", Ocode);
             var    ParamempID1 = new SqlParameter("@UserId", UserId);
             string SP_SQL      = "[HRM_GetUserAccessListByUserId] @ocode,@UserId";
             return((_context.ExecuteStoreQuery <RUserAccessRole>(SP_SQL, ParamempID, ParamempID1)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #5
0
 internal List <PPermissionList> getPagePermissionByRoleId(string Ocode, int role)
 {
     try
     {
         using (var _context = new ERPSSL_AdminEntities1())
         {
             var    ParamempID  = new SqlParameter("@ocode", Ocode);
             var    ParamempID1 = new SqlParameter("@RoleId", role);
             string SP_SQL      = "[HRM_GetPageParmissionListByRoleId] @ocode,@RoleId";
             return((_context.ExecuteStoreQuery <PPermissionList>(SP_SQL, ParamempID, ParamempID1)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #6
0
        internal IEnumerable <Category> GetCategoryByModulId(string Ocode, int ModuleId)
        {
            using (var _context = new ERPSSL_AdminEntities1())
            {
                return((from page in _context.tbl_Page
                        join c in _context.tbl_Category on page.categoryId equals c.categoryId
                        where page.ModuleID == ModuleId && page.OCODE == Ocode && page.Status == true && c.Status == true


                        select new Category
                {
                    CategoryName = c.Name,
                    categoryid = (int)page.categoryId,
                    ID = (int)c.CategoryOrder
                }).Distinct().OrderBy(x => x.ID).ToList());
            }
        }
Beispiel #7
0
        //for dropdown list - Lesger list
        internal List <Ac_Configuration_Ledger> GetAc_Configuration_Ledger(string OCode, string Company_Code)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var OCode_        = new SqlParameter("@OCode", OCode);
                    var Company_Code_ = new SqlParameter("@Company_Code", Company_Code);

                    string SP_SQL = "Leg_Get_AC_LedgerByVoucher @Company_Code,@OCode";
                    return((_context.ExecuteStoreQuery <Ac_Configuration_Ledger>(SP_SQL, Company_Code_, OCode_)).ToList());
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #8
0
        //for sales User Summary display
        internal List <Ac_Sales_Summary> GetAc_SalesSummary(string OCode, string SaleType)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var OCode_    = new SqlParameter("@OCode", OCode);
                    var SaleType_ = new SqlParameter("@SaleType", SaleType);

                    string SP_SQL = "EPO_Get_UserSales_Summary @OCode,@SaleType";
                    return((_context.ExecuteStoreQuery <Ac_Sales_Summary>(SP_SQL, OCode_, SaleType_)).ToList());
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #9
0
        internal IEnumerable <RPage> GetPages(string Ocode)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var ParamempID = new SqlParameter("@OCODE", Ocode);

                    string SP_SQL = "Adp_GetPageList @OCODE";

                    return((_context.ExecuteStoreQuery <RPage>(SP_SQL, ParamempID)).ToList());
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #10
0
        //for module main comfiguration
        internal List <Ac_Configuration> GetAc_Configuration(string OCode, string ModuleType, string VoucherType)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var OCode_       = new SqlParameter("@OCode", OCode);
                    var ModuleType_  = new SqlParameter("@ModuleType", ModuleType);
                    var VoucherType_ = new SqlParameter("@VoucherType", VoucherType);

                    string SP_SQL = "Conf_Get_Module_Ledger @OCode,@ModuleType,@VoucherType";
                    return((_context.ExecuteStoreQuery <Ac_Configuration>(SP_SQL, OCode_, ModuleType_, VoucherType_)).ToList());
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #11
0
 internal List <RUserAccessRole> GetUserAccessInfobyModuleandUserId(string Ocode, string UserId, int moduleId, int featureId)
 {
     try
     {
         using (var _context = new ERPSSL_AdminEntities1())
         {
             var    ParamempID  = new SqlParameter("@ocode", Ocode);
             var    ParamempID1 = new SqlParameter("@UserId", UserId);
             var    ParamempID2 = new SqlParameter("@moduleId", moduleId);
             var    ParamempID3 = new SqlParameter("@CategoryId", featureId);
             string SP_SQL      = "[HRM_GetUserAccessListByUserIdModuleIdAndCategoryId] @ocode,@UserId,@moduleId,@CategoryId";
             return((_context.ExecuteStoreQuery <RUserAccessRole>(SP_SQL, ParamempID, ParamempID1, ParamempID2, ParamempID3)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #12
0
        internal IEnumerable <RPage> CategoryesForgridValue(string Ocode, int catagoryValue)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var ParamempID    = new SqlParameter("@OCODE", Ocode);
                    var CatagoryValue = new SqlParameter("@CatagoryId", catagoryValue);

                    string SP_SQL = "Adp_GetPageListByCatagoryId @OCODE,@CatagoryId";

                    return((_context.ExecuteStoreQuery <RPage>(SP_SQL, ParamempID, CatagoryValue)).ToList());
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #13
0
        //for sales User Summary post
        internal int Sync_SalesSummary(string OCode, string SaleType, string VoucherDate, string EditUser, Double ItemTotal)
        {
            try
            {
                using (var _context = new ERPSSL_AdminEntities1())
                {
                    var OCode_       = new SqlParameter("@OCode", OCode);
                    var SaleType_    = new SqlParameter("@SaleType", SaleType);
                    var VoucherDate_ = new SqlParameter("@VoucherDate", VoucherDate);
                    var EditUser_    = new SqlParameter("@EditUser", EditUser);
                    var ItemTotal_   = new SqlParameter("@ItemTotal", ItemTotal);


                    string SP_SQL = "EPO_Sync_UserSales_Summary @OCode,@SaleType,@VoucherDate,@EditUser,@ItemTotal";
                    return(_context.ExecuteStoreCommand(SP_SQL, OCode_, SaleType_, VoucherDate_, EditUser_, ItemTotal_));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #14
0
        internal List <RPagePermission> GetPagePermissionList(string Ocode)
        {
            using (var _context = new ERPSSL_AdminEntities1())
            {
                return((from page in _context.tbl_PagePermission
                        join r in _context.tbl_UserRole on page.RoleID equals r.RoleID
                        join p in _context.tbl_Page on page.PageID equals p.PageID
                        join c in _context.tbl_Category on page.CategoryId equals c.categoryId

                        where page.OCODE == Ocode
                        select new RPagePermission
                {
                    pagePermissionId = (int)page.PermissionID,
                    RoleName = r.RoleName,
                    PageName = p.PageName,
                    CanVisit = page.CanVisit,
                    CanDelete = page.CanDelete,
                    CanEdit = page.CanEdit,
                    CanExecute = page.CanExecute,
                    CategoryName = c.Name
                }).ToList());
            }
        }