예제 #1
0
        public void fillHeaderGrid()
        {
            var queryArgument = new QueryArgument(UserContext.DataBaseInfo)
            {
                filter1   = Constants.TRNInProcessOFF,
                filter2   = Constants.PurchaseRequestTdType,
                FilterKey = Constants.TableFolloupApprove
            };
            var orderTxn = _transactionManager.GetFollowupDataForApprove(queryArgument);
            KeyValuePairItems headers = new KeyValuePairItems();

            headers.Add(new KeyValuePairItem("1", Constants.ForcastingHeader));
            headers.Add(new KeyValuePairItem("2", Constants.FRHeader));
            ForecastingGridViewListControl.GVHeaders = headers;
            ForecastingGridViewListControl.IsVisiableColumn(2, true);
            ForecastingGridViewListControl.IsVisiableColumn(6, true);
            ForecastingGridViewListControl.IsVisiableColumn(7, true);
            ForecastingGridViewListControl.IsVisiableColumn(8, true);
            ForecastingGridViewListControl.IsVisiableColumn(9, true);
            ForecastingGridViewListControl.IsVisiableColumn(10, true);
            ForecastingGridViewListControl.changeActionName = Constants.ApproveAction;

            ForecastingGridViewListControl.OrderTxns = orderTxn;
            uplForm.Update();
        }
예제 #2
0
        //protected void ddl2_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    fillHeaderGrid();
        //}
        public void fillHeaderGrid()
        {
            var orderTxn = new OrderTransactions();

            if (FilterOrder == Constants.FreshOrder)
            {
                var queryArgument = new QueryArgument(UserContext.DataBaseInfo)
                {
                    Key     = StageType == Constants.BillTrackingType ? Constants.SaleRequestTdType : Constants.PurchaseRequestTdType,
                    filter1 = StageType == Constants.BillTrackingType ? Constants.TRNLogedOFF + "," + Constants.TRNInProcessOFF + "," + Constants.TRNCompletedOFF : Constants.TRNLogedOFF,
                    filter2 = CategoryType,
                    filter3 = ForecastingGridViewListControl.Ddl1.SelectedValue.Trim(),
                    filter4 = string.IsNullOrEmpty(ForecastingGridViewListControl.Text1Value) ? Constants.RetriveList :
                              string.Format("{0}|{1}", ForecastingGridViewListControl.Text1Value, Constants.RetriveList),
                    //filter5 = StageType == Constants.BillTrackingType ? ForecastingGridViewListControl.Ddl2.SelectedValue.Trim() : string.Empty,
                    FilterKey = Constants.TableFolloup
                };
                orderTxn = _transactionManager.GetFollowupData(queryArgument);
            }
            else
            {
                var queryArgument = new QueryArgument(UserContext.DataBaseInfo)
                {
                    filter2 = CategoryType,
                    filter3 = ForecastingGridViewListControl.Ddl1.SelectedValue.Trim(),
                    filter4 = string.IsNullOrEmpty(ForecastingGridViewListControl.Text1Value) ? Constants.RetriveList :
                              string.Format("{0}|{1}", ForecastingGridViewListControl.Text1Value, Constants.RetriveList),
                    FilterKey = Constants.FlolloupPendingFollowup
                };
                orderTxn = _transactionManager.GetpPendingFollowupData(queryArgument);
            }

            KeyValuePairItems headers = new KeyValuePairItems();

            headers.Add(new KeyValuePairItem("1", Constants.ForcastingHeader));
            if (StageType == Constants.BillTrackingType)
            {
                headers.Add(new KeyValuePairItem("2", Constants.SRHeader));
                if (FilterOrder == Constants.PendingOrder)
                {
                    headers.Add(new KeyValuePairItem("5", Constants.StatusHeader));
                }
                else
                {
                    headers.Add(new KeyValuePairItem("5", Constants.ReqLocHeader));
                }
            }
            else
            {
                headers.Add(new KeyValuePairItem("2", Constants.FRHeader));
            }
            ForecastingGridViewListControl.GVHeaders = headers;
            ForecastingGridViewListControl.IsVisiableColumn(2, true);

            ForecastingGridViewListControl.OrderTxns = orderTxn;
            uplForm.Update();
        }
예제 #3
0
        public void fillPartGrid()
        {
            if (SlNoKey == string.Empty || SlNoKey == null)
            {
                return;
            }
            var orderDetail = OrderTransactionsData.FirstOrDefault().orderDetails.Where(x => x.SlNo.Trim() == SlNoKey).FirstOrDefault();

            if (orderDetail == null)
            {
                return;
            }
            divEdit.Attributes.Add("style", "display:block");
            ForecastingEditPart.divGVvisiable        = false;
            ForecastingEditPart.StatusOrderNoDivTrue = true;
            ForecastingEditPart.PartType             = orderDetail.MaterialGroup.Id;

            var keyValuePairItems = new KeyValuePairItems();

            keyValuePairItems.Add(new KeyValuePairItem(orderDetail.PartDetail.PartNumber.Trim() + " " + Constants.SpecialCharApprox + " " + orderDetail.PartDetail.Description.Trim(), orderDetail.PartDetail.PartNumber.Trim()));
            ForecastingEditPart.fillDdl(ForecastingEditPart.PartControl as DropDownList, keyValuePairItems);

            ForecastingEditPart.PartNumber          = orderDetail.PartDetail.PartNumber;
            ForecastingEditPart.CategoryCode        = orderDetail.MaterialType.Id;
            ForecastingEditPart.RemaingQty          = orderDetail.Quantity;
            ForecastingEditPart.BillingLocationCode = orderDetail.WarehouseTo.Id;
            ForecastingEditPart.Modality            = orderDetail.Modality;
            //  ForecastingEditPart.LogistiOrderNumber = orderDetail.LogisticOrderNumber;
            ForecastingEditPart.setVisiablelnkAddNew = false;
            ForecastingEditPart.setVisiablelnkSave   = true;
            ForecastingEditPart.setEnablePart        = false;
            ForecastingEditPart.IsEnablePartType     = false;

            if (StageType == Constants.BillTrackingType)
            {
                //Cahnges CurrentStatuts
                keyValuePairItems.Clear();
                keyValuePairItems.Add(new KeyValuePairItem("Ordering", Constants.OrderingType));
                keyValuePairItems.Add(new KeyValuePairItem("On Hold", "OH"));
                keyValuePairItems.Add(new KeyValuePairItem("Wating for more part", "WP"));
                keyValuePairItems.Add(new KeyValuePairItem("EOL Part", "EP"));
                keyValuePairItems.Add(new KeyValuePairItem("Alternate Part Number Needed", "AN"));
                keyValuePairItems.Add(new KeyValuePairItem("Send Back", "CS"));
                ForecastingEditPart.fillDdl(ForecastingEditPart.DropdownStatus, keyValuePairItems);

                if (ForecastingGridViewListControl.Ddl1.SelectedValue == Constants.TxnStockTransferType)
                {
                    keyValuePairItems.Clear();
                    keyValuePairItems.Add(new KeyValuePairItem("Ordering", Constants.OrderingType));
                    keyValuePairItems.Add(new KeyValuePairItem("On Hold", "OH"));
                    keyValuePairItems.Add(new KeyValuePairItem("EOL Part", "EP"));
                    keyValuePairItems.Add(new KeyValuePairItem("Alternate Part Number Needed", "AN"));
                    keyValuePairItems.Add(new KeyValuePairItem("Send Back", "CS"));
                    ForecastingEditPart.fillDdl(ForecastingEditPart.DropdownStatus, keyValuePairItems);
                }

                if (FilterOrder == Constants.PendingOrder)
                {
                    ForecastingEditPart.DropdownStatus.SelectedIndex = 1;
                    ForecastingEditPart.setEnableCurrentStatus       = false;
                }
                else
                {
                    ForecastingEditPart.setEnableCurrentStatus = true;
                }
            }
            else
            {
                ForecastingEditPart.CurrentStatus          = orderDetail.CurrentStatus;
                ForecastingEditPart.setEnableCurrentStatus = false;
            }
            //  ForecastingEditPart.setEnableLogisticNumber = false;
            ForecastingEditPart.addKeyupText(ForecastingEditPart.txtqty, "onkeyup");
            Action = Constants.InsertAction;
            uplView.Update();
        }