Exemple #1
0
        private void RefreshSumValueItem(IssueItem issueItem)
        {
            int    pos      = 6;
            string serial   = issueItem.Serial;
            var    dataItem = mListLargeSmallData.FirstOrDefault(l => l.Serial == serial && l.Pos == pos);

            if (dataItem == null)
            {
                return;
            }
            LargeSmallItem item = new LargeSmallItem();

            item.Serial          = serial;
            item.Date            = issueItem.Date;
            item.Number          = issueItem.Number;
            item.Pos             = pos;
            item.SumValue        = issueItem.SumValue;
            item.Large           = dataItem.Large;
            item.Small           = dataItem.Small;
            item.Single          = dataItem.Single;
            item.Double          = dataItem.Double;
            item.LargeSmallNum   = dataItem.LargeSmallNum;
            item.SingleDoubleNum = dataItem.SingleDoubleNum;
            item.LargeNum        = dataItem.LargeNum;
            item.SmallNum        = dataItem.SmallNum;
            item.SingleNum       = dataItem.SingleNum;
            item.DoubleNum       = dataItem.DoubleNum;
            mListSumValueItems.Add(item);
        }
Exemple #2
0
 private void RefreshPositionItem(IssueItem issueItem)
 {
     for (int i = 0; i < mListPositionItems.Count; i++)
     {
         var    posItem  = mListPositionItems[i];
         int    pos      = posItem.Pos;
         string serial   = issueItem.Serial;
         var    dataItem = mListLargeSmallData.FirstOrDefault(l => l.Serial == serial && l.Pos == pos);
         if (dataItem == null)
         {
             continue;
         }
         LargeSmallItem item = new LargeSmallItem();
         item.Serial          = serial;
         item.Date            = issueItem.Date;
         item.Number          = issueItem.Number;
         item.Pos             = pos;
         item.Large           = dataItem.Large;
         item.Small           = dataItem.Small;
         item.Single          = dataItem.Single;
         item.Double          = dataItem.Double;
         item.LargeSmallNum   = dataItem.LargeSmallNum;
         item.SingleDoubleNum = dataItem.SingleDoubleNum;
         item.LargeNum        = dataItem.LargeNum;
         item.SmallNum        = dataItem.SmallNum;
         item.SingleNum       = dataItem.SingleNum;
         item.DoubleNum       = dataItem.DoubleNum;
         posItem.Items.Add(item);
     }
 }
        public IssueItem GetIssueItem(int?IItemId)
        {
            PetaPoco.Database db = null;
            var       dbConn     = DataContext.Database.Connection;
            IssueItem user       = new IssueItem();

            try
            {
                using (DataContext)
                {
                    dbConn.Open();
                    db = new PetaPoco.Database(dbConn);
                    db.EnableAutoSelect = false;
                    user = db.Query <IssueItem>("exec usp_GetIssueItem " + "@IItemId",
                                                new { IItemId = IItemId }).FirstOrDefault();
                    dbConn.Close();
                }
            }
            catch (Exception ex)
            {
                throw;
            }

            finally
            {
                if (dbConn != null)
                {
                    dbConn.Close();
                }
            }
            return(user);
        }
Exemple #4
0
        public ActionResult SaveIssue(IssueItem item)
        {
            if (ModelState.IsValid)
            {
                IssueItem resultItem = null;
                switch (item.InitializationType)
                {
                case InitializationTypes.Insert:
                    resultItem = service.SaveIssue(item);
                    break;

                case InitializationTypes.Update:
                    resultItem = service.SaveIssue(item);
                    break;
                }
                if (item.IssueCategoryID == 1)
                {
                    return(RedirectToAction("Index", "Resident"));
                }
                else
                {
                    return(RedirectToAction("Index", "Company"));
                }
            }
            else
            {
                InitializeViewBugs();
                return(View("Template", item));
            }
        }
        public async Task <IActionResult> PutIssueItem([FromRoute] int id, [FromBody] IssueItem issueItem)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != issueItem.IssueItemID)
            {
                return(BadRequest());
            }

            _context.Entry(issueItem).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!IssueItemExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public MainPage()
        {
            Item = new IssueItem
            {
                Id          = 1232,
                Title       = "Getting Started",
                Description = @"Create a page to enter Issues that we need to work on.

## Acceptance Criteria

- Display the issue Id
- Provide an ability to select the issue Type (i.e. Bug, Feature, etc)
- Include an Issue Title
- Include a full issue description with support for MarkDown
- Include an issue effort
- Include an ability for a developer to update the Status (i.e Icebox, WIP, etc)

## Additional Comments

We would like to have a visual indicator for the type of issue as well as something to visualize the effort involved",
                Effort      = 3,
                Status      = IssueStatus.WIP,
                Type        = IssueType.Feature,
                CreatedAt   = new DateTimeOffset(2019, 04, 03, 08, 0, 0, TimeSpan.FromHours(-8)),
                StartedAt   = new DateTimeOffset(2019, 04, 30, 08, 0, 0, TimeSpan.FromHours(-8))
            };

            this.InitializeComponent();
        }
Exemple #7
0
        public ActionResult Edit(int Id)
        {
            IssueService objIssueService = new IssueService();
            IssueItem    objIssueItem    = new IssueItem();

            objIssueItem = objIssueService.GetById(Id);
            CategoryService     objCatServ = new CategoryService();
            List <CategoryItem> lstCat     = new List <CategoryItem>();
            int cid = 0;

            if (Session["CompID"] != null)
            {
                cid = Convert.ToInt32(Session["CompID"].ToString());
            }
            lstCat = objCatServ.GetALL(cid);
            objIssueItem.lstCategory = new List <CategoryItem>();
            objIssueItem.lstCategory.AddRange(lstCat);

            ItemService        objItemService = new ItemService();
            List <AssestsItem> lstItem        = new List <AssestsItem>();

            lstItem = objItemService.GetALLItems(cid);
            objIssueItem.lstAllItem = new List <AssestsItem>();
            objIssueItem.lstAllItem.AddRange(lstItem);

            List <IssueItem> lstIssue = new List <IssueItem>();

            lstIssue = objIssueService.GetALL();
            objIssueItem.lstIssueItem = new List <IssueItem>();
            objIssueItem.lstIssueItem.AddRange(lstIssue);

            return(View(objIssueItem));
        }
Exemple #8
0
 public void Refresh(IssueItem issueItem)
 {
     LoadLostData();
     RefreshIssueItem(issueItem);
     RefreshIssueDateItem(issueItem);
     InitPath();
     InitIssuePaths();
 }
Exemple #9
0
        public int InsertIssueDetails(IssueItem model)
        {
            Mapper.CreateMap <IssueItem, IssueDetail>();
            IssueDetail objIssueItem = Mapper.Map <IssueDetail>(model);

            dbContext.IssueDetails.Add(objIssueItem);
            return(dbContext.SaveChanges());
        }
Exemple #10
0
        public ActionResult Edit(IssueItem Model)
        {
            IssueItem    objIssueItem    = new IssueItem();
            IssueService objIssueService = new IssueService();

            int i = objIssueService.Update(Model);

            return(RedirectToAction("Create"));
        }
Exemple #11
0
 private void InitializeOralConsultationIssueViewBugs(IssueItem item)
 {
     ViewBag.ResidentID          = item.ResidentID;
     ViewBag.IssueCategoryID     = item.IssueCategoryID;
     ViewBag.ResidentName        = item.FirstName + " " + item.MiddleName + " " + item.LastName;
     ViewBag.IdentificatorNumber = item.IdentificatorNumber;
     ViewBag.BirthDate           = String.Format("{0:yyyy-MM-dd}", item.BirthDate);
     ViewBag.CompanyName         = item.CompanyName;
 }
Exemple #12
0
        public ActionResult <IssueItem> Create(IssueItem issueItem)
        {
            _issueService.Create(issueItem);

            return(CreatedAtRoute(
                       "GetIssue",
                       new { id = issueItem.Id.ToString() },
                       issueItem));
        }
Exemple #13
0
 public void Refresh(IssueItem issueItem)
 {
     LoadTendencyData();
     RefreshTendencyNumberItem(issueItem);
     RefreshTendencyPosItem(issueItem);
     InitItemWidth();
     InitNumberHeights();
     InitNumberPaths();
     InitCaculateInfos();
 }
Exemple #14
0
 public void OnPostIssue(object sender, EventArgs e)
 {
     var newIssue = new IssueItem()
     {
         Descripcion = "App Esecure " + issueDesc.Text,
         IssueListId = 1
     };
     var json = JsonConvert.SerializeObject(newIssue);
     var x    = JsonHelper.PostFromJson("http://18.231.176.208/gemba/api/IssueItems/", json);
 }
Exemple #15
0
        private void RefreshTendencyPosItem(IssueItem issueItem)
        {
            DateItem dateItem = ComboDate.SelectedItem as DateItem;

            if (dateItem == null)
            {
                return;
            }
            int date = dateItem.Date;

            if (date != issueItem.Date)
            {
                return;
            }
            for (int i = 0; i < mListPositionItems.Count; i++)
            {
                var    posItem    = mListPositionItems[i];
                int    pos        = posItem.Pos;
                string serial     = issueItem.Serial;
                var    numberItem = mListNumberItems.FirstOrDefault(n => n.Serial == serial);
                if (numberItem != null)
                {
                    posItem.NumberItems.Add(numberItem);
                }
                var dataItem = mListTendencyData.FirstOrDefault(t => t.Serial == serial && t.Pos == pos);
                if (dataItem == null)
                {
                    continue;
                }
                TendencyDetailItem item = new TendencyDetailItem();
                item.Serial = serial;
                item.Number = dataItem.Number;
                item.Date   = date;
                item.Pos    = pos;
                if (dataItem.Repeat)
                {
                    item.Category = 1;
                }
                if (dataItem.Osillation)
                {
                    item.Category = 2;
                }
                if (dataItem.Increase)
                {
                    item.Category = 3;
                }
                if (dataItem.Other)
                {
                    item.Category = 4;
                }
                item.Times = dataItem.Times;
                item.Range = dataItem.Range;
                posItem.Items.Add(item);
            }
        }
 void IGeoDataService.AddIssue(IssueItem issue)
 {
     try
     {
         _store.Add(issue);
         OperationContext.Current.GetCallbackChannel<IGeoDataCallback>().IssueAdded(issue);
     }
     catch (Exception)
     {
     }
 }
Exemple #17
0
        public ActionResult BindAllItem(int Cat_id)
        {
            ItemService objItemService = new ItemService();
            IssueItem   objIssueItem   = new IssueItem();

            List <AssestsItem> lstItem = new List <AssestsItem>();

            lstItem = objItemService.GetItemsBYCatId(Cat_id);
            objIssueItem.lstAllItem = new List <AssestsItem>();
            objIssueItem.lstAllItem.AddRange(lstItem);
            return(Json(objIssueItem.lstAllItem, JsonRequestBehavior.AllowGet));
        }
Exemple #18
0
        private void RefreshTendencyNumberItem(IssueItem issueItem)
        {
            DateItem dateItem = ComboDate.SelectedItem as DateItem;

            if (dateItem == null)
            {
                return;
            }
            int date = dateItem.Date;

            if (date != issueItem.Date)
            {
                return;
            }
            string serial = issueItem.Serial;
            var    data   = mListTendencyData.Where(t => t.Serial == serial).ToList();

            if (data.Count <= 0)
            {
                return;
            }
            TendencyNumberItem item = new TendencyNumberItem();

            item.Serial = serial;
            item.Date   = date;
            for (int i = 0; i < data.Count; i++)
            {
                var dataItem = data[i];
                item.Number = dataItem.Number;
                int pos = dataItem.Pos;
                if (pos == 1)
                {
                    item.D1Range = dataItem.Range;
                }
                if (pos == 2)
                {
                    item.D2Range = dataItem.Range;
                }
                if (pos == 3)
                {
                    item.D3Range = dataItem.Range;
                }
                if (pos == 4)
                {
                    item.D4Range = dataItem.Range;
                }
                if (pos == 5)
                {
                    item.D5Range = dataItem.Range;
                }
            }
            mListNumberItems.Add(item);
        }
        public ActionResult CreateIssueItems([Bind(Prefix = "updated")] List <IssueItemModel> updatedItems,
                                             [Bind(Prefix = "created")] List <IssueItemModel> createdItems,
                                             [Bind(Prefix = "deleted")] List <IssueItemModel> deletedItems)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    //Create IssueItems
                    if (updatedItems != null)
                    {
                        //get the current issue
                        var issueId    = updatedItems.Count > 0 ? updatedItems[0].IssueId : 0;
                        var issueItems = _issueItemRepository.GetAll().Where(r => r.IssueId == issueId).ToList();
                        foreach (var model in updatedItems)
                        {
                            //we don't merge if the issue item already existed
                            if (!issueItems.Any(r => r.ItemId == model.ItemId))
                            {
                                //manually mapping here to set only foreign key
                                //if used AutoMapper, the reference property will also be mapped
                                //and EF will consider these properties as new and insert it
                                //so db records will be duplicated
                                //we can also ignore it in AutoMapper configuation instead of manually mapping
                                var issueItem = new IssueItem
                                {
                                    IssueId              = model.IssueId,
                                    StoreLocatorId       = model.StoreLocator.Id,
                                    ItemId               = model.ItemId,
                                    IssueQuantity        = model.IssueQuantity,
                                    IssueUnitOfMeasureId = model.IssueUnitOfMeasureId,
                                    Quantity             = model.IssueQuantity
                                };
                                _issueService.UpdateIssueCost(issueItem);
                                _issueItemRepository.Insert(issueItem);
                            }
                        }
                    }

                    _dbContext.SaveChanges();
                    SuccessNotification(_localizationService.GetResource("Record.Saved"));
                    return(new NullJsonResult());
                }
                catch (Exception e)
                {
                    return(Json(new { Errors = e.Message }));
                }
            }
            else
            {
                return(Json(new { Errors = ModelState.SerializeErrors() }));
            }
        }
Exemple #20
0
        private void InitLottery()
        {
            var newestIssue = mListIssues.FirstOrDefault();

            if (newestIssue == null)
            {
                return;
            }
            mNewestIssueItem    = newestIssue;
            TxtLastLottery.Text = ParseLottery();
            TxtLastNumber.Text  = ParseLotteryNumber();
        }
 public void Add(IssueItem item)
 {
     using (var session = _sessionFactory.OpenSession())
     {
         using (var tx = session.BeginTransaction())
         {
             session.SaveOrUpdate(item.Geom);
             session.SaveOrUpdate(item);
             session.Transaction.Commit();
         }
     }
 }
Exemple #22
0
        public int Update(IssueItem model)
        {
            IssueDetail objIssue = dbContext.IssueDetails.SingleOrDefault(m => m.IssueId == model.IssueId);

            objIssue.Item_id       = model.Item_id;
            objIssue.Cat_id        = model.Cat_id;
            objIssue.IssueQuantity = model.IssueQuantity;
            objIssue.VendorName    = model.VendorName;
            objIssue.ChallanNo     = model.ChallanNo;

            objIssue.UpdatedDate = System.DateTime.Now;
            return(dbContext.SaveChanges());
        }
        public ActionResult AddIssueItem(int?IItemId)
        {
            StoreService service = new StoreService();
            IssueItem    Product = new IssueItem();

            if (IItemId != null)
            {
                Product = service.GetIssueItem(IItemId);
            }
            ViewBag.Request = new SelectList(AllRequests(), "Value", "Text");
            ViewBag.RItem   = new SelectList(AllRequestItems(Product.RequestId), "Value", "Text");
            return(PartialView("_AddIssueItem", Product));
        }
Exemple #24
0
        public IActionResult Update(string id, IssueItem issueItemIn)
        {
            var issueItem = _issueService.Get(id);

            if (issueItem == null)
            {
                return(NotFound());
            }

            _issueService.Update(id, issueItemIn);

            return(NoContent());
        }
        public async Task <IActionResult> PostIssueItem([FromBody] IssueItem issueItem)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            // .ListaIssues.Add(issueItem)
            // var List =
            _context.IssueList.Include(x => x.ListaIssues).Where(y => y.IssueListId == issueItem.IssueListId).First().ListaIssues.Add(issueItem);
            // _context.IssueItem.Add(issueItem);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetIssueItem", new { id = issueItem.IssueItemID }, issueItem));
        }
Exemple #26
0
        public int UpdateIssueItem(IssueItem user)
        {
            int id = 0;

            try
            {
                id = _repository.UpdateIssueItem(user);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(id);
        }
Exemple #27
0
 public ActionResult SaveIssue(IssueItem item)
 {
     if (ModelState.IsValid)
     {
         item = issueService.SaveIssue(item);
         InitializeOralConsultationViewBugs();
         return(RedirectToAction("InitOralConsultation", new { issueID = item.IssueID }));
     }
     else
     {
         InitializeIssueViewBugs();
         return(View("Issue", item));
     }
 }
Exemple #28
0
        public virtual void UpdateIssueCost(IssueItem issueItem)
        {
            decimal?totalCost    = 0;
            var     storeLocator = _storeLocatorRepository.GetById(issueItem.StoreLocatorId);

            _storeService.FindStoreLocatorItemRemovals(
                storeLocator.StoreId,
                issueItem.StoreLocatorId,
                issueItem.ItemId,
                issueItem.Quantity ?? 0,
                out totalCost);

            issueItem.IssueCost = totalCost;
        }
Exemple #29
0
        public async Task <IActionResult> OnGetAsync(int?iiid)
        {
            if (iiid == null)
            {
                return(NotFound());
            }

            IssueItem = await _context.IssueItem.FirstOrDefaultAsync(m => m.IssueItemID == iiid);

            if (IssueItem == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemple #30
0
        public ActionResult Create(IssueItem Model)
        {
            IssueItem    objIssueItem    = new IssueItem();
            IssueService objIssueService = new IssueService();

            int       i             = objIssueService.InsertIssueDetails(Model);
            StockItem objStockModel = new StockItem();

            objStockModel.ItemId    = Model.Item_id;
            objStockModel.IssueQty  = Model.IssueQuantity;
            objStockModel.IssueDate = Model.IssueDate;
            int j = objIssueService.InsertIssueStock(objStockModel);

            return(RedirectToAction("Create"));
        }
Exemple #31
0
        public IssueItem GetIssueItem(int?IItemId)
        {
            IssueItem user = new IssueItem();

            try
            {
                user = _repository.GetIssueItem(IItemId);
            }

            catch (Exception ex)
            {
                throw;
            }

            return(user);
        }
Exemple #32
0
        public async Task <IActionResult> OnPostAsync(int?iiid)
        {
            if (iiid == null)
            {
                return(NotFound());
            }

            IssueItem = await _context.IssueItem.FindAsync(iiid);

            if (IssueItem != null)
            {
                _context.IssueItem.Remove(IssueItem);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
 bool IGeoDataService.UpdateIssue(IssueItem issue)
 {
     throw new NotImplementedException();
 }
 public void Update(IssueItem item)
 {
 }