//ActionResult<APixuWeatherReport>
        public Object GetWeatherReport(ApiRequest apirequest)
        {
            if (apirequest.Place == null)
            {
                return(NotFound());
            }
            WeatherService          obj  = new WeatherService();
            APixuWeatherReportFinal obj1 = new APixuWeatherReportFinal();
            IDatabase db = AppConstant.rediscon.GetDatabase();

            var projectData = db.StringGet("Apixu" + apirequest.Place + apirequest.RequestDate.date);

            if (!string.IsNullOrEmpty(projectData))
            {
                Console.WriteLine("Get Data From Cache");
                // return   JsonConvert.DeserializeObject<APixuWeatherReport>(projectData);
            }
            else
            {
                Console.WriteLine("Set Data in Cache");
                db.StringSet("Apixu" + apirequest.Place + apirequest.RequestDate.date, obj.GetAPixuWeatherReport(apirequest.Place));

                projectData = db.StringGet("Apixu" + apirequest.Place + apirequest.RequestDate.date);
                // return  JsonConvert.DeserializeObject<APixuWeatherReport>(projectData);
            }

            obj1.APixuWeatherReport = JsonConvert.DeserializeObject <APixuWeatherReport>(projectData);
            // Console.WriteLine();
            //Console.WriteLine(JsonConvert.DeserializeObject<APixuWeatherReport>(projectData).current.temp_c,'C');
            obj1.Tempindiffform = (Tempindiffform)AppConstant.tempconversion(JsonConvert.DeserializeObject <APixuWeatherReport>(projectData).current.temp_c, 'C');
            return(obj1);
        }
Beispiel #2
0
        public ActionResult GetAllSP()
        {
            List <SPNames> lstAllSP = new List <SPNames>();

            try
            {
                DataTable SPNameData = BLScript.GetAllSPNames();

                if (SPNameData != null && SPNameData.Rows.Count > 0)
                {
                    foreach (DataRow rowItem in SPNameData.Rows)
                    {
                        SPNames objSPName = new SPNames()
                        {
                            SPName      = Convert.ToString(rowItem["name"]),
                            Create_Date = Convert.ToString(rowItem["create_date"]),
                            Modify_Date = Convert.ToString(rowItem["modify_date"])
                        };
                        lstAllSP.Add(objSPName);
                    }
                }
            }
            catch (Exception ex)
            {
                AppConstant.WriteLogFile(ex.ToString());
            }

            return(View(lstAllSP));
        }
Beispiel #3
0
 private void Excute()
 {
     if (AppConstant.ValidateInput(RegistrationNo))
     {
         try
         {
             var id = SlotID.Split('-').ToList();
             PMSService.Insert(new Vehicle_Parking()
             {
                 RegistrationId = RegistrationNo,
                 ArrivalTime    = EntryTime.ToLocalTime(),
                 DepartTime     = null,
                 SlotId         = Convert.ToInt16(id.ElementAtOrDefault(1)),
                 TotalFare      = null,
                 VehicleType    = VehicleType.ToString(),
                 Floor          = id.ElementAt(0).ToString()
             });
         }
         catch (Exception ex)
         {
             Debug.WriteLine(ex.Message);
         }
         MessageBoxResult messageBoxResult = MessageBox.Show("Data inserted Successfully!", "Saved", MessageBoxButton.OK);
         if (messageBoxResult == MessageBoxResult.OK)
         {
             ClearForm();
         }
     }
     else
     {
         MessageBox.Show("Enter valid Registration No!", "Oops");
     }
 }
        public Object GetOpenWeatherMap(ApiRequest apirequest)
        {
            WeatherService   obj  = new WeatherService();
            OpenWeatherFinal obj1 = new OpenWeatherFinal();
            IDatabase        db   = AppConstant.rediscon.GetDatabase();


            var projectData = db.StringGet("OpenWeather" + apirequest.Place + apirequest.RequestDate.date);

            if (!string.IsNullOrEmpty(projectData))
            {
                Console.WriteLine("Get Data From Cache");
                // return   JsonConvert.DeserializeObject<OpenWeather>(projectData);
            }
            else
            {
                Console.WriteLine("Set Data in Cache");
                db.StringSet("OpenWeather" + apirequest.Place + apirequest.RequestDate.date, obj.GetOpenWeatherMap(apirequest.Place));

                projectData = db.StringGet("OpenWeather" + apirequest.Place + apirequest.RequestDate.date);
                // return  JsonConvert.DeserializeObject<OpenWeather>(projectData);
            }

            obj1.OpenWeather    = JsonConvert.DeserializeObject <OpenWeather>(projectData);
            obj1.Tempindiffform = (Tempindiffform)AppConstant.tempconversion(JsonConvert.DeserializeObject <OpenWeather>(projectData).main.temp, 'K');
            return(Ok(obj1));
        }
Beispiel #5
0
        private List <ProductModel> GetProductList()
        {
            AppConstant permission = new AppConstant();

            var ProductViewModels = _ProductService.BMSUnit.ProductRepository.GetAll().ToList().Select(
                md => new ProductModel
            {
                Id          = md.Id,
                ProductCode = md.ProductCode,
                ProductName = md.ProductName,
                GenericName = md.GenericName,
                //ShortDesc = md.ShortDesc,
                HSCode       = md.HSCode,
                SellingUnit  = md.SellingUnit,
                SamplingUnit = md.SamplingUnit,
                UnitPrice    = md.UnitPrice,
                //DutyStructure = md.DutyStructure,
                //Origin = md.Origin,
                //MOQ = md.MOQ,
                //LeadTime = md.LeadTime,
                ActionLink = Common.KendoUIGridActionLinkGenerate("PCV", "Product", md.Id.ToString(), false, true, true)
            }).OrderBy(o => o.ProductName).ThenBy(ot => ot.GenericName);

            return(ProductViewModels.ToList());
        }
Beispiel #6
0
        private List <SampleRequestModel> GetSampleRequestList()
        {
            AppConstant permission = new AppConstant();

            //var userName = HttpContext.User.Identity.Name;
            //var companyCode = _SampleRequestService.BMSUnit.UserInfoRepository.GetAll().Where(c => c.UserId == userName).ToList().FirstOrDefault().CompanyCode;
            //var voucherInfoViewModels = _pettyCashVoucherInfoService.BMSUnit.WebVoucherMasterRepository.GetAll().Where(c=>c.UserId == userId && c.Posted == "N").ToList().Select(

            //  var _Models = _SampleRequestService.BMSUnit.SampleRequestRepository.GetAll().Where(x => x.DeliveryStateId == (int)Common.DeliveryStateEnum.Undelivered || x.DeliveryStateId == null).ToList().Select(
            var _Models = _SampleRequestService.BMSUnit.SampleRequestRepository.GetAll().ToList().Select(
                md => new SampleRequestModel
            {
                Id              = Convert.ToInt64(md.Id),
                RequestNo       = md.RequestNo,
                RequestDate     = md.RequestDate,
                Organization    = _SampleRequestService.BMSUnit.OrganizationRepository.GetByID(md.OrganizationId).Organization,
                SupplierName    = _SampleRequestService.BMSUnit.SupplierRepository.GetByID(md.SupplierId).SupplierName,
                TransporterName = md.TransporterId != null ? _SampleRequestService.BMSUnit.TransporterRepository.GetByID(md.TransporterId).TransporterName:"",
                DocTrackingNo   = md.DocTrackingNo,
                //DeliveryStateId=(int)md.DeliveryStateId,
                //DeliveryState = Enum.GetName(typeof(Common.DeliveryStateEnum), (int)md.DeliveryStateId),
                DeliveryState = md.DeliveryStateId != null ? Enum.GetName(typeof(Common.DeliveryStateEnum), (int)md.DeliveryStateId) : "",
                ActionLink    = Common.KendoUIGridActionLinkGenerate("PCV", "SampleRequest", md.Id.ToString(), false, true, false)
            }).OrderBy(o => o.RequestNo).ThenBy(ot => ot.RequestDate);

            return(_Models.ToList());
        }
Beispiel #7
0
        //ActionResult<DarkSky>
        public Object GetDarkSkyWeatherReport(ApiRequest apirequest)
        {
            if (apirequest.lat + "," + apirequest.lon == null)
            {
                return(NotFound());
            }
            WeatherService   obj  = new WeatherService();
            DarkSkyFinalData obj1 = new DarkSkyFinalData();

            IDatabase db = AppConstant.rediscon.GetDatabase();

            var projectData = db.StringGet("DarkSky" + apirequest.Place + apirequest.RequestDate.date);

            if (!string.IsNullOrEmpty(projectData))
            {
                Console.WriteLine("Get Data From Cache");
                // return   JsonConvert.DeserializeObject<DarkSky>(projectData);
            }
            else
            {
                Console.WriteLine("Set Data in Cache");
                db.StringSet("DarkSky" + apirequest.Place + apirequest.RequestDate.date, obj.GetDarkSkyWeatherReport(apirequest.lat + "," + apirequest.lon));

                projectData = db.StringGet("DarkSky" + apirequest.Place + apirequest.RequestDate.date);


                //   return  JsonConvert.DeserializeObject<DarkSky>(projectData).currently.temperature;
            }


            obj1.DarkSky        = JsonConvert.DeserializeObject <DarkSky>(projectData);
            obj1.Tempindiffform = (Tempindiffform)AppConstant.tempconversion(JsonConvert.DeserializeObject <DarkSky>(projectData).currently.temperature, 'F');
            return(Ok(obj1));
        }
Beispiel #8
0
        private ListOrdersResponse InvokeListOrders()
        {
            // Create a request.
            ListOrdersRequest request = new ListOrdersRequest();

            request.SellerId     = sellerId;
            request.MWSAuthToken = mwsAuthToken;
            //request.CreatedAfter = AppConstant.lastUpdatedAfter.Value;
            request.LastUpdatedAfter = lastUpdatedAfter.Value;
            //request.BuyerEmail = "*****@*****.**";
            //request.SellerOrderId = "111-8517710-2175410";
            //List<string> orderStatus = new List<string>();
            //orderStatus.Add("Shipped");
            //orderStatus.Add("Pending");
            //request.OrderStatus = orderStatus;
            List <string> marketplaceId = new List <string>();

            marketplaceId.Add(shopMarketplaceId);
            request.MarketplaceId = marketplaceId;
            List <string> fulfillmentChannel = new List <string>();
            //request.FulfillmentChannel = fulfillmentChannel;
            List <string> paymentMethod = new List <string>();
            //request.PaymentMethod = paymentMethod;
            decimal maxResultsPerPage = AppConstant.getOrderSynQuantity();//订单商品30个请求数量,所以这里设置30个

            request.MaxResultsPerPage = maxResultsPerPage;
            List <string> tfmShipmentStatus = new List <string>();
            //request.TFMShipmentStatus = tfmShipmentStatus;
            List <string> easyShipShipmentStatus = new List <string>();

            //request.EasyShipShipmentStatus = easyShipShipmentStatus;
            return(this.client.ListOrders(request));
        }
Beispiel #9
0
 public PaxtonRepository()
 {
     PORT      = AppConstant.getPort();
     ip        = AppConstant.getIp();
     password  = AppConstant.getPassword();
     oemClient = new OemClient(ip, PORT);
     common    = new Common();
 }
 public static AppConstant GetInstance()
 {
     if (con == null) {
             con = (new GameObject ("AppConstant")).AddComponent<AppConstant> ();
             return con;
         } else {
             return con;
         }
 }
        private List <ParticularViewModel> GetParticularList()
        {
            AppConstant permission = new AppConstant();

            var particularModels = _ExpenseBudgetService.BMSUnit.ParticularRepository.GetAll().ToList().Select(
                md => new ParticularViewModel
            {
                ParticularId   = md.Id,
                ParticularName = md.ParticularName
            }).OrderBy(o => o.ParticularId).ThenBy(ot => ot.ParticularId);

            return(particularModels.ToList());
        }
Beispiel #12
0
        private List <SupplierViewModel> GetSupplierList()
        {
            AppConstant permission = new AppConstant();

            var supplierModels = _SalesBudgetService.BMSUnit.SupplierRepository.GetAll().ToList().Select(
                md => new SupplierViewModel
            {
                SupplierId   = md.Id,
                SupplierName = md.SupplierName
            }).OrderBy(o => o.SupplierName).ThenBy(ot => ot.SupplierId);

            return(supplierModels.ToList());
        }
 private static void synInventory()
 {
     while (true)
     {
         AppConstant.SynTaskInfo.InventoryTask.dealInfoAppend("同步开始");
         AppConstant.SynTaskInfo.InventoryTask.ExecuteTimes   += 1;
         AppConstant.SynTaskInfo.InventoryTask.LastExecuteTime = DateTime.Now;
         doSyn();
         Double synInventoryTimeMinutes = AppConstant.getInventorySynIntervalMinute();
         AppConstant.SynTaskInfo.InventoryTask.dealInfoAppend("同步结束等待" + synInventoryTimeMinutes + "分钟");
         Thread.Sleep(TimeSpan.FromHours(synInventoryTimeMinutes));
     }
 }
Beispiel #14
0
        private List <PriceTermModel> GetPriceTermList()
        {
            AppConstant permission = new AppConstant();

            var termModels = _QuoteService.BMSUnit.PriceTermRepository.GetAll().ToList().Select(
                md => new PriceTermModel
            {
                PriceTermId   = md.Id,
                PriceTermName = md.PriceTermName
            }).OrderBy(o => o.PriceTermId).ThenBy(ot => ot.PriceTermId);

            return(termModels.ToList());
        }
 private static void synOrder()
 {
     while (true)
     {
         AppConstant.SynTaskInfo.OrderTask.dealInfoAppend("同步开始");
         AppConstant.SynTaskInfo.OrderTask.ExecuteTimes   += 1;
         AppConstant.SynTaskInfo.OrderTask.LastExecuteTime = DateTime.Now;
         doSynOrder();
         Double orderSynIntervalMinute = AppConstant.getOrderSynIntervalMinute();
         AppConstant.SynTaskInfo.OrderTask.dealInfoAppend("同步结束等待" + orderSynIntervalMinute + "分钟");
         Thread.Sleep(TimeSpan.FromMinutes(orderSynIntervalMinute));
     }
 }
Beispiel #16
0
        private List <CountryViewModel> CountryList()
        {
            AppConstant permission = new AppConstant();

            var countryListModels = _QuoteService.BMSUnit.CountryRepository.GetAll().ToList().Select(
                md => new CountryViewModel
            {
                ShipmentCountryId = md.Id,
                CountryName       = md.CountryName
            }).OrderBy(o => o.ShipmentCountryId).ThenBy(ot => ot.ShipmentCountryId);

            return(countryListModels.ToList());
        }
Beispiel #17
0
        private List <CustomerInfoModel> GetCustomerList()
        {
            AppConstant permission = new AppConstant();

            var customerModels = _SampleRequestService.BMSUnit.CustomerRepository.GetAll().ToList().Select(
                md => new CustomerInfoModel
            {
                Id           = md.Id,
                CustomerName = md.CustomerName
            }).OrderBy(o => o.CustomerName);

            return(customerModels.ToList());
        }
Beispiel #18
0
        private List <CustViewModel> GetCustList()
        {
            AppConstant permission = new AppConstant();

            var customerModels = _SalesBudgetService.BMSUnit.CustomerRepository.GetAll().ToList().Select(
                md => new CustViewModel
            {
                CustomerId   = md.Id,
                CustomerName = md.CustomerName
            }).OrderBy(o => o.CustomerName).ThenBy(ot => ot.CustomerId);

            return(customerModels.ToList());
        }
Beispiel #19
0
        private List <CurrentStageViewModel> GetCurrentStageList()
        {
            AppConstant permission = new AppConstant();

            var customerModels = _CallReportInfoService.BMSUnit.CurrentStageRepository.GetAll().ToList().Select(
                md => new CurrentStageViewModel
            {
                StageId   = md.Id,
                StageName = md.CurrentStage
            }).OrderBy(o => o.StageId).ThenBy(ot => ot.StageId);

            return(customerModels.ToList());
        }
Beispiel #20
0
        private List <CallReportSalesCallInquiryInfoModel> GetSalesCallInquiryList()
        {
            AppConstant permission = new AppConstant();

            var SalesCallInquiryViewModels = _CallReportInfoService.BMSUnit.CallReportSalesCallInquiryRepository.GetAll().ToList().Select(
                md => new CallReportSalesCallInquiryInfoModel
            {
                Id           = md.Id,
                CustomerName = _CallReportInfoService.BMSUnit.CustomerRepository.GetAll().Where(c => c.Id == md.CustomerId).FirstOrDefault().CustomerName,
                SupplierName = _CallReportInfoService.BMSUnit.SupplierRepository.GetAll().Where(c => c.Id == md.SupplierId).FirstOrDefault().SupplierName,
                ActionLink   = Common.KendoUIGridActionLinkGenerateCallReport("PCV", "CallReport", "SalesCallInquiry", md.Id.ToString(), false, true, false)
            }).OrderBy(o => o.CustomerName).ThenBy(ot => ot.SupplierName);

            return(SalesCallInquiryViewModels.ToList());
        }
        private List <VoucherDebitACModel> GetDebitACList()
        {
            AppConstant permission = new AppConstant();

            var voucherDebitACModels = _pettyCashVoucherInfoService.BMSUnit.viewWebACMasterRepository.GetAll().ToList().Select(
                md => new VoucherDebitACModel
            {
                AMCode    = md.AMCode,
                AMDetails = md.AMDetails
                            //IsActive = md.IsActive,
                            // ActionLink = Common.KendoUIGridActionLinkGenerate("PCV", "PettyCashVoucher", md.Id.ToString(), false, true, true)
            }).OrderBy(o => o.AMCode).ThenBy(ot => ot.AMCode);

            return(voucherDebitACModels.ToList());
        }
Beispiel #22
0
        private List <SBUModel> GetSBUList()
        {
            AppConstant permission = new AppConstant();

            var SBUViewModels = _SBUService.BMSUnit.SBURepository.GetAll().ToList().Select(
                md => new SBUModel
            {
                Id           = md.Id,
                SBUName      = md.SBUName,
                Descriptions = md.Descriptions,
                ActionLink   = Common.KendoUIGridActionLinkGenerate("PCV", "SBU", md.Id.ToString(), false, true, true)
            }).OrderBy(o => o.SBUName).ThenBy(ot => ot.Descriptions);

            return(SBUViewModels.ToList());
        }
        private List <ArticleCategoryModel> GetArticleCategoryList()
        {
            AppConstant permission = new AppConstant();

            var articleCategoryViewModels = _sdArtCategoryService.INVUnit.ArticleCategoryRepository.GetAll().ToList().Select(
                md => new ArticleCategoryModel
            {
                Id           = md.Id,
                CategoryName = md.CategoryName,
                Description  = md.Description,
                ActionLink   = Common.KendoUIGridActionLinkGenerate("SD", "ArticleCategory", md.Id.ToString(), true, true, true)
            }).OrderBy(o => o.CategoryName).ThenBy(ot => ot.Description);

            return(articleCategoryViewModels.ToList());
        }
Beispiel #24
0
        private List <VisitInfoModel> GetVisitList()
        {
            AppConstant permission = new AppConstant();

            var VisitViewModels = _VisitService.BMSUnit.VisitInformationRepository.GetAll().ToList().Select(
                md => new VisitInfoModel
            {
                Id = md.Id,
                PreparationDate   = md.PreparationDate,
                PointOfDiscussion = md.PointOfDiscussion,
                ActionLink        = Common.KendoUIGridActionLinkGenerate("PCV", "Visit", md.Id.ToString(), false, true, true)
            }).OrderBy(o => o.Id);

            return(VisitViewModels.ToList());
        }
Beispiel #25
0
        private List <DebitNoteModel> GetDebitNoteList()
        {
            AppConstant permission = new AppConstant();

            var DebitNoteViewModels = _DebitNoteService.BMSUnit.DebitNoteRepository.GetAll().ToList().Select(
                md => new DebitNoteModel
            {
                Id            = Convert.ToInt64(md.Id),
                DebitNoteNo   = md.DebitNoteNo,
                DebitNoteDate = md.DebitNoteDate,
                Organization  = _DebitNoteService.BMSUnit.OrganizationRepository.GetByID(md.OrganizationId).Organization,
                SupplierName  = _DebitNoteService.BMSUnit.SupplierRepository.GetByID(md.SupplierId).SupplierName,
                ActionLink    = Common.KendoUIGridActionLinkGenerate("PCV", "DebitNote", md.Id.ToString(), true, true, true)
            }).OrderBy(o => o.DebitNoteNo).ThenBy(ot => ot.DebitNoteDate);

            return(DebitNoteViewModels.ToList());
        }
Beispiel #26
0
        private List <PriceRequestModel> GetPriceRequesttList()
        {
            //(_SalesBudgetService.BMSUnit.SBURepository.GetAll().Where(c=> Convert.ToInt64(c.Id) ==  Convert.ToInt64(md.SBUId)).FirstOrDefault().SBUName)
            AppConstant permission = new AppConstant();

            var _Models = _PriceRequestService.BMSUnit.PriceRequestRepository.GetAll().ToList().Select(
                md => new PriceRequestModel
            {
                Id = Convert.ToInt64(md.Id),
                PriceRequestDate = md.PriceRequestDate,
                SupplierName     = _PriceRequestService.BMSUnit.SupplierRepository.GetAll().Where(c => Convert.ToInt64(c.Id) == Convert.ToInt64(md.SupplierId)).FirstOrDefault().SupplierName,
                CustomerName     = _PriceRequestService.BMSUnit.CustomerRepository.GetAll().Where(c => Convert.ToInt64(c.Id) == Convert.ToInt64(md.CustomerId)).FirstOrDefault().CustomerName,
                ActionLink       = Common.KendoUIGridActionLinkGenerate("PCV", "PriceRequest", md.Id.ToString(), false, true, false)
            }).OrderBy(o => o.Id).ThenBy(ot => ot.Id);

            return(_Models.ToList());
        }
Beispiel #27
0
        private List <InvoiceModel> GetInvoiceList()
        {
            AppConstant permission = new AppConstant();

            var InvoiceViewModels = _InvoiceService.BMSUnit.InvoiceRepository.GetAll().ToList().Select(
                md => new InvoiceModel
            {
                Id           = Convert.ToInt64(md.Id),
                InvoiceNo    = md.InvoiceNo,
                InvoiceDate  = md.InvoiceDate,
                Organization = _InvoiceService.BMSUnit.OrganizationRepository.GetByID(md.OrganizationId).Organization,
                CustomerName = _InvoiceService.BMSUnit.CustomerRepository.GetByID(md.CustomerId).CustomerName,
                NET          = md.NET,
                ActionLink   = Common.KendoUIGridActionLinkGenerate("PCV", "Invoice", md.Id.ToString(), true, true, true)
            }).OrderBy(o => o.InvoicePeriod).ThenBy(ot => ot.InvoiceDate);

            return(InvoiceViewModels.ToList());
        }
Beispiel #28
0
        public ActionResult GetSPBetweenDates(FormCollection objCollection)
        {
            List <SPNames> lstAllSP = new List <SPNames>();

            try
            {
                string strFromDate = objCollection["fromdate"] != null?Convert.ToString(objCollection["fromdate"]) : "";

                string strToDate = objCollection["todate"] != null?Convert.ToString(objCollection["todate"]) : "";

                DateTime?sqlFromDate = !string.IsNullOrEmpty(strFromDate) ? Convert.ToDateTime(strFromDate) : (DateTime?)null;
                DateTime?sqlToDate   = !string.IsNullOrEmpty(strToDate) ? Convert.ToDateTime(strToDate) : (DateTime?)null;

                if (sqlToDate.HasValue)
                {
                    sqlToDate = sqlToDate.Value.AddMinutes(1439);
                }

                DataTable SPNameData = BLScript.GetModifyedSPNamesBetweenDates(sqlFromDate.Value, sqlToDate.Value);

                if (SPNameData != null && SPNameData.Rows.Count > 0)
                {
                    foreach (DataRow rowItem in SPNameData.Rows)
                    {
                        SPNames objSPName = new SPNames()
                        {
                            SPName      = Convert.ToString(rowItem["name"]),
                            Create_Date = Convert.ToString(rowItem["create_date"]),
                            Modify_Date = Convert.ToString(rowItem["modify_date"])
                        };
                        lstAllSP.Add(objSPName);
                    }
                }

                ViewBag.FromDate = strFromDate;
                ViewBag.ToDate   = strToDate;
            }
            catch (Exception ex)
            {
                AppConstant.WriteLogFile(ex.ToString());
            }

            return(View(lstAllSP));
        }
Beispiel #29
0
        private List <SalesBudgetModel> GetSalesBudgetList()
        {
            //(_SalesBudgetService.BMSUnit.SBURepository.GetAll().Where(c=> Convert.ToInt64(c.Id) ==  Convert.ToInt64(md.SBUId)).FirstOrDefault().SBUName)
            AppConstant permission = new AppConstant();

            var _Models = _SalesBudgetService.BMSUnit.SalesBudgetRepository.GetAll().ToList().Select(
                md => new SalesBudgetModel
            {
                Id              = Convert.ToInt64(md.Id),
                BudgetYear      = md.BudgetYear,
                SalesPersonName = _SalesBudgetService.BMSUnit.UserInfoNameRepository.GetAll().Where(c => c.Id == md.SalesPersonId).FirstOrDefault().UserName,
                SBUName         = (Convert.ToInt64(md.SBUId) > 0) ? (_SalesBudgetService.BMSUnit.SBURepository.GetAll().Where(c => Convert.ToInt64(c.Id) == Convert.ToInt64(md.SBUId)).FirstOrDefault().SBUName) : "",
                ProductName     = (Convert.ToInt64(md.ProductId) > 0) ? (_SalesBudgetService.BMSUnit.ProductRepository.GetAll().Where(c => Convert.ToInt64(c.Id) == Convert.ToInt64(md.ProductId)).FirstOrDefault().ProductName) : "",

                ActionLink = Common.KendoUIGridActionLinkGenerate("PCV", "SalesBudget", md.Id.ToString(), false, true, false)
            }).OrderBy(o => o.Id).ThenBy(ot => ot.Id);

            return(_Models.ToList());
        }
Beispiel #30
0
        public string this[string columnName]
        {
            get
            {
                string result = null;
                if (columnName == "SlotID")
                {
                    if (string.IsNullOrEmpty(SlotID))
                    {
                        result = "SlotId cannot be empty.";
                        return(result);
                    }
                }

                if (columnName == "EntryTime")
                {
                    if (string.IsNullOrEmpty(EntryTime.ToString()))
                    {
                        result = "Entry Time cannot be empty";
                        return(result);
                    }
                }

                if (columnName == "RegistrationNo")
                {
                    if (string.IsNullOrEmpty(RegistrationNo))
                    {
                        result = "RegistrationNo cannot be empty";
                        return(result);
                    }

                    if (!AppConstant.ValidateInput(RegistrationNo))
                    {
                        result = "Invalid registration number!";
                        return(result);
                    }
                }


                return(null);
            }
        }
Beispiel #31
0
        private List <CallReportProjectInfoModel> GetSampleRequestList()
        {
            AppConstant permission = new AppConstant();

            var ProjectViewModels = _CallReportInfoService.BMSUnit.CallReportProjectRepository.GetAll().ToList().Select(
                md => new CallReportProjectInfoModel
            {
                Id                 = md.Id,
                ProjectName        = md.ProjectName,
                CurrentStage       = _CallReportInfoService.BMSUnit.CurrentStageRepository.GetAll().Where(c => c.Id == md.CurrentStageId).FirstOrDefault().CurrentStage,
                Description        = md.Description,
                SellingOpportunity = md.SellingOpportunity,
                PotVolPerYear      = md.PotVolPerYear,
                PotAmountPerYear   = md.PotAmountPerYear,
                RemarkNextAction   = md.RemarkNextAction,
                ActionLink         = Common.KendoUIGridActionLinkGenerateCallReport("PCV", "CallReport", "Project", md.Id.ToString(), false, true, false)
            }).OrderBy(o => o.ProjectName).ThenBy(ot => ot.CurrentStage);

            return(ProjectViewModels.ToList());
        }
    void Awake()
    {
        // First we check if there are any other instances conflicting
            if (con != null && con != this) {
                // If that is the case, we destroy other instances
                Destroy (gameObject);
            }

            // Here we save our singleton instance
            con = this;

            // Furthermore we make sure that we don't destroy between scenes (this is optional)
            DontDestroyOnLoad (gameObject);
    }