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

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

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

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

            return(items);
        }
Exemplo 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));
        }
Exemplo n.º 6
0
        public tbl_Package GetPackageByID(Int64 id)
        {
            CRUDOperation operation = new CRUDOperation();
            var           item      = operation.GetPackageByID(id);;

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

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

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

            return(items);
        }
Exemplo 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);
        }
Exemplo n.º 11
0
        private static tbl_SMSSenderInfo GetShortAverageCost(string senderName)
        {
            CRUDOperation     cRUDOperation = new CRUDOperation();
            tbl_SMSSenderInfo senderInfo    = cRUDOperation.GetSMSSenderInfoByName(senderName);

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

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

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

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

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

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

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

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

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

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

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

            return(items);
        }
Exemplo 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);
        }
Exemplo 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)
            {
            }
        }
Exemplo n.º 25
0
        public List <tbl_Region> GetRegions()
        {
            CRUDOperation operation = new CRUDOperation();
            var           regions   = operation.GetRegions();;

            return(regions);
        }
Exemplo 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);
        }
Exemplo n.º 27
0
        public List <tbl_Region> GetRegionsByType(int type)
        {
            CRUDOperation cRUDOperation = new CRUDOperation();
            var           regions       = cRUDOperation.GetRegionsByType(type);;

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

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

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

            return(items);
        }