Esempio n. 1
0
        public tbl_ProposalUserSave GetProposalUserSaveByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           item      = operation.GetProposalUserSaveById(id);;

            return(item);
        }
Esempio n. 2
0
        public tbl_Region GetRegionByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           region    = operation.GetRegionById(id);;

            return(region);
        }
Esempio n. 3
0
        public List <tbl_Permission> GetPermissions()
        {
            CRUDOperation operation   = new CRUDOperation();
            var           permissions = operation.GetPermissons();;

            return(permissions);
        }
Esempio n. 4
0
        public tbl_SMSSenderInfo GetPackagesByMobileEVID(string senderName)
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetSMSSenderInfoByName(senderName);;

            return(items);
        }
Esempio n. 5
0
        public ActionResult Edit(int id, string senderName)
        {
            SMSSenderInfoVM viewModel      = new SMSSenderInfoVM();
            CRUDOperation   dataOperations = new CRUDOperation();

            viewModel = poulateDropDownList(viewModel);
            if (id > 0)
            {
                tbl_SMSSenderInfo tblItem = dataOperations.GetSMSSenderInfoByID(id);
                viewModel.ID = id;
                viewModel.ActivityTypeEVID = tblItem.ActivityType;
                viewModel.SenderName       = tblItem.SenderName;
                viewModel.Description      = tblItem.Description;
                viewModel.Number           = tblItem.Number;
                viewModel.Price            = tblItem.Price;
                viewModel.Point            = tblItem.Point;
                viewModel.Cheque           = tblItem.Cheque;
            }
            else
            {
                viewModel.SenderName = senderName;
            }



            return(View(viewModel));
        }
Esempio n. 6
0
        public tbl_Package GetPackageByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           item      = operation.GetPackageByID(id);;

            return(item);
        }
Esempio n. 7
0
        public List <tbl_SMSSenderInfo> GetSMSSenderInfos()
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetSMSSenderInfos();;

            return(items);
        }
Esempio n. 8
0
        public tbl_EnumCategory GetEnumCategoryByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           item      = operation.GetEnumCategoryById(id);;

            return(item);
        }
Esempio n. 9
0
        public List <tbl_EnumValue> GetEnumCategories()
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetEnumValues();;

            return(items);
        }
Esempio n. 10
0
        private static tbl_OperatorInformation GetAverageCost(string prefix, int type)
        {
            CRUDOperation           cRUDOperation       = new CRUDOperation();
            tbl_OperatorInformation operatorInformation = cRUDOperation.GetOperatorInformationByPrefixAndType(prefix, type, (int)OperatorChanelType.Message);

            return(operatorInformation);
        }
Esempio n. 11
0
        private static tbl_SMSSenderInfo GetShortAverageCost(string senderName)
        {
            CRUDOperation     cRUDOperation = new CRUDOperation();
            tbl_SMSSenderInfo senderInfo    = cRUDOperation.GetSMSSenderInfoByName(senderName);

            return(senderInfo);
        }
Esempio n. 12
0
        public tbl_ProviderService GetProviderServiceByID(Int64 id)
        {
            CRUDOperation operation       = new CRUDOperation();
            var           providerservice = operation.GetProviderServiceById(id);;

            return(providerservice);
        }
Esempio n. 13
0
        public List <tbl_ProviderService> GetProviderServices()
        {
            CRUDOperation operation        = new CRUDOperation();
            var           providerservices = operation.GetProviderServices();;

            return(providerservices);
        }
Esempio n. 14
0
        public List <tbl_ProposalUserSave> GetProposalUserSaveByUserID(Int64 userID)
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetProposalUserSavesByUserId(userID);;

            return(items);
        }
Esempio n. 15
0
        public tbl_Role GetRoleByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           roles     = operation.GetRoleById(id);;

            return(roles);
        }
Esempio n. 16
0
        public tbl_EnumValue GetEnumValueByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           item      = operation.GetEnumValueById(id);;

            return(item);
        }
Esempio n. 17
0
        public List <tbl_Package> GetPackages()
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetPackages();;

            return(items);
        }
Esempio n. 18
0
        public List <tbl_EnumValue> GetEnumValuesByEnumCategoryID(Int64 enumCategoryID)
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetEnumValuesByEnumCategoryID(enumCategoryID);;

            return(items);
        }
Esempio n. 19
0
        public List <tbl_Package> GetPackagesByMobileEVID(Int64 moebileEVID)
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetPackagesByMobileEVID(moebileEVID);;

            return(items);
        }
Esempio n. 20
0
        public List <tbl_EnumValue> GetEnumValuesByEnumCategoryCode(string enumCategoryCode)
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetEnumValuesByEnumCategoryCode(enumCategoryCode);;

            return(items);
        }
Esempio n. 21
0
        public tbl_SMSSenderInfo GetSMSSenderInfoByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           item      = operation.GetSMSSenderInfoByID(id);;

            return(item);
        }
Esempio n. 22
0
        public List <tbl_PackagePrice> GetPackagePriceByPackageID(Int64 packageID)
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetPackagePricesByPackageID(packageID);;

            return(items);
        }
Esempio n. 23
0
        public HttpResponseMessage GetProposalDocumentByID(Int64 documentID)
        {
            var result =
                new HttpResponseMessage(HttpStatusCode.OK);
            CRUDOperation        cRUDOperation = new CRUDOperation();
            tbl_ProposalDocument document      = cRUDOperation.GetProposalDocumentByID(documentID);
            // 1) Get file bytes
            var fileBytes = File.ReadAllBytes(document.ImageLinkPath);

            // 2) Add bytes to a memory stream
            var fileMemStream =
                new MemoryStream(fileBytes);

            // 3) Add memory stream to response
            result.Content = new StreamContent(fileMemStream);

            // 4) build response headers
            var headers = result.Content.Headers;

            headers.ContentDisposition =
                new ContentDispositionHeaderValue("attachment");
            headers.ContentDisposition.FileName = document.ImageLinkName;

            headers.ContentType =
                new MediaTypeHeaderValue("application/jpg");
            //new MediaTypeHeaderValue("application/octet-stream");

            headers.ContentLength = fileMemStream.Length;

            return(result);
        }
Esempio n. 24
0
        public void AddNetConsumePoint(Int64 userID, string userName, tbl_NetConsumeDetail _netConsumeDetail)
        {
            try
            {
                CRUDOperation        cRUDOperation        = new CRUDOperation();
                decimal              pointValue           = 0;
                decimal              priceValue           = 0;
                int                  operatorEVID         = NetConsumeHelper.GetOperatorValueByKey(_netConsumeDetail.OperatorName.Trim());
                NetConsumeRepository netConsumeRepository = new NetConsumeRepository();
                if (_netConsumeDetail.Source_EVID == 4)
                {
                    tbl_PackagePrice packagePrice = netConsumeRepository.GetPackagePrice(operatorEVID, _netConsumeDetail.Consumed);
                    if (packagePrice != null)
                    {
                        pointValue = 1 * (packagePrice.Point == null ? 0 : (decimal)packagePrice.Point);
                        priceValue = 1 * (packagePrice.Price == null ? 0 : (decimal)packagePrice.Price);
                    }
                }

                AddUserPointAndPrice(userID, _netConsumeDetail.Month, _netConsumeDetail.Year, pointValue, priceValue, (int)ChanelType.NetConsume);
            }
            catch (Exception)
            {
            }
        }
Esempio n. 25
0
        public List <tbl_Region> GetRegions()
        {
            CRUDOperation operation = new CRUDOperation();
            var           regions   = operation.GetRegions();;

            return(regions);
        }
Esempio n. 26
0
        private ExpenseDTO GetExpenseChannelInfo(string shortName, string expenseName, decimal expense)
        {
            CRUDOperation             cRUDOperation   = new CRUDOperation();
            List <tbl_ExpenseChannel> expenseChannels = cRUDOperation.GetExpenseChannelsByName(shortName, expenseName);

            ExpenseDTO expenseDTO = null;

            foreach (var item in expenseChannels)
            {
                if (expense <= item.Expense)
                {
                    expenseDTO = new ExpenseDTO {
                        Expense            = item.Expense,
                        ApproximateExpense = item.ExpenseFactor,
                    };
                    break;
                }
            }
            if (expenseDTO == null)
            {
                expenseDTO = new ExpenseDTO()
                {
                    Expense            = expense,
                    ApproximateExpense = expense * 2,
                };
            }
            return(expenseDTO);
        }
Esempio n. 27
0
        public List <tbl_Region> GetRegionsByType(int type)
        {
            CRUDOperation cRUDOperation = new CRUDOperation();
            var           regions       = cRUDOperation.GetRegionsByType(type);;

            return(regions);
        }
Esempio n. 28
0
        public List <tbl_Role> GetRoles()
        {
            CRUDOperation operation = new CRUDOperation();
            var           roles     = operation.GetRoles();;

            return(roles);
        }
Esempio n. 29
0
        public tbl_Permission GetPermissionByID(Int64 id)
        {
            CRUDOperation operation  = new CRUDOperation();
            var           permission = operation.GetPermissionById(id);;

            return(permission);
        }
Esempio n. 30
0
        public List <tbl_ProposalUserSave> GetProposalUserSaves()
        {
            CRUDOperation operation = new CRUDOperation();
            var           items     = operation.GetProposalUserSaves();;

            return(items);
        }