Inheritance: System.Web.UI.UserControl, IEditableTextControl
Example #1
0
    protected void FV_TransportPriceListDetail_DataBound(object sender, EventArgs e)
    {
        ((Literal)(this.FV_WarehouseLease.FindControl("lbCurrentTransportPriceList"))).Text = this.TransportPriceListCode;

        if (TransportPriceListDetailId != null && TransportPriceListDetailId != string.Empty)
        {
            TransportPriceListDetail transportPriceListDetail = (TransportPriceListDetail)((FormView)sender).DataItem;

            Controls_TextBox tbCurrency = (Controls_TextBox)(this.FV_WarehouseLease.FindControl("tbCurrency"));

            if (transportPriceListDetail.Currency != null && transportPriceListDetail.Currency.Code != string.Empty)
            {
                tbCurrency.Text = transportPriceListDetail.Currency.Code;
            }

            TextBox tbStartDate = ((TextBox)(this.FV_WarehouseLease.FindControl("tbStartDate")));

            if (transportPriceListDetail.StartDate != null)
            {
                tbStartDate.Text = transportPriceListDetail.StartDate.ToString("yyyy-MM-dd");
            }

            TextBox tbEndDate = ((TextBox)(this.FV_WarehouseLease.FindControl("tbEndDate")));

            if (transportPriceListDetail.EndDate != null)
            {
                tbEndDate.Text = ((DateTime)transportPriceListDetail.EndDate).ToString("yyyy-MM-dd");
            }
        }
    }
Example #2
0
    public void InitPageParameter(string locationCode, string areaCode)
    {
        Controls_TextBox tbAreaCode  = (Controls_TextBox)(this.FV_StorageBin.FindControl("tbAreaCode"));
        TextBox          tbAreaCode1 = (TextBox)(this.FV_StorageBin.FindControl("tbAreaCode1"));

        ((CheckBox)(this.FV_StorageBin.FindControl("cbIsActive"))).Checked   = true;
        ((TextBox)(this.FV_StorageBin.FindControl("tbLocationCode"))).Text   = locationCode;
        ((TextBox)(this.FV_StorageBin.FindControl("tbBinCode"))).Text        = string.Empty;
        ((TextBox)(this.FV_StorageBin.FindControl("tbBinDescription"))).Text = string.Empty;


        tbAreaCode.Text  = areaCode;
        tbAreaCode1.Text = areaCode;
        //if (areaCode != null && areaCode != string.Empty)
        //{
        //    tbAreaCode.Visible = false;
        //    tbAreaCode1.Visible = true;
        //}
        //else
        //{
        //    tbAreaCode.Visible = true;
        //    tbAreaCode1.Visible = false;
        //}
        //this.ucBin.InitPageParameter(area.Code);
    }
Example #3
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            StorageBin storageBin = (StorageBin)e.Row.DataItem;
            Label      lblBinCode = (Label)(e.Row.FindControl("lblBinCode"));

            Controls_TextBox tbBinCodeFrom = (Controls_TextBox)(e.Row.FindControl("tbBinCodeFrom"));
            Label            lbTo          = (Label)(e.Row.FindControl("lbTo"));
            Controls_TextBox tbBinCodeTo   = (Controls_TextBox)(e.Row.FindControl("tbBinCodeTo"));

            if (storageBin.IsBlank)
            {
                lblBinCode.Visible             = false;
                tbBinCodeFrom.Visible          = true;
                tbBinCodeFrom.ServiceParameter = "string:" + this.Location;
                tbBinCodeFrom.DataBind();
                lbTo.Visible                 = true;
                tbBinCodeTo.Visible          = true;
                tbBinCodeTo.ServiceParameter = "string:" + this.Location;
                tbBinCodeTo.DataBind();
            }
            e.Row.FindControl("lbtnAdd").Visible    = storageBin.IsBlank;
            e.Row.FindControl("lbtnDelete").Visible = !storageBin.IsBlank;
        }
    }
Example #4
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            InspectItem inspectItem = (InspectItem)e.Row.DataItem;

            if (inspectItem.IsBlank)
            {
                e.Row.FindControl("lblItemCode").Visible = false;
                Controls_TextBox tbItemCode = (Controls_TextBox)e.Row.FindControl("tbItemCode");
                tbItemCode.Visible          = true;
                tbItemCode.ServiceParameter = "string:" + tbFlow.Text.Trim();
                tbItemCode.DataBind();
                e.Row.FindControl("lbtnAdd").Visible = true;
            }
            else
            {
                e.Row.FindControl("lblItemCode").Visible = true;
                e.Row.FindControl("tbItemCode").Visible  = false;
                com.Sconit.Control.CodeMstrDropDownList tbDefectClassification = (com.Sconit.Control.CodeMstrDropDownList)e.Row.FindControl("tbDefectClassification");
                tbDefectClassification.SelectedValue = inspectItem.DefectClassification;
                com.Sconit.Control.CodeMstrDropDownList tbDefectFactor = (com.Sconit.Control.CodeMstrDropDownList)e.Row.FindControl("tbDefectFactor");
                tbDefectFactor.SelectedValue = inspectItem.DefectFactor;
            }
        }
    }
Example #5
0
    private void UpdateView()
    {
        priceListdetail = ThePriceListDetailMgr.LoadPriceListDetail(Convert.ToInt32(this.code));
        TextBox          tbCode         = (TextBox)(this.FV_PriceListDetail.FindControl("tbCode"));
        TextBox          tbPriceList    = (TextBox)(this.FV_PriceListDetail.FindControl("tbPriceList"));
        TextBox          tbStartDate    = (TextBox)(this.FV_PriceListDetail.FindControl("tbStartDate"));
        TextBox          tbEndDate      = (TextBox)(this.FV_PriceListDetail.FindControl("tbEndDate"));
        TextBox          tbItem         = (TextBox)(this.FV_PriceListDetail.FindControl("tbItem"));
        Controls_TextBox tbCurrency     = (Controls_TextBox)(this.FV_PriceListDetail.FindControl("tbCurrency"));
        TextBox          tbUnitPrice    = (TextBox)(this.FV_PriceListDetail.FindControl("tbUnitPrice"));
        Controls_TextBox tbUom          = (Controls_TextBox)(this.FV_PriceListDetail.FindControl("tbUom"));
        TextBox          tbTaxCode      = (TextBox)(this.FV_PriceListDetail.FindControl("tbTaxCode"));
        CheckBox         cbIsIncludeTax = (CheckBox)(this.FV_PriceListDetail.FindControl("cbIsIncludeTax"));

        // CheckBox cbIsProvEst = (CheckBox)(this.FV_PriceListDetail.FindControl("cbIsProvEst"));

        if (priceListdetail != null)
        {
            tbCode.Text      = priceListdetail.Id.ToString();
            tbPriceList.Text = priceListdetail.PriceList.Code;
            tbStartDate.Text = priceListdetail.StartDate.ToString("yyyy-MM-dd");
            if (priceListdetail.EndDate != null)
            {
                tbEndDate.Text = ((DateTime)priceListdetail.EndDate).ToString("yyyy-MM-dd");
            }
            tbItem.Text            = priceListdetail.Item.Code;
            tbCurrency.Text        = priceListdetail.Currency.Code;
            tbUnitPrice.Text       = priceListdetail.UnitPrice.ToString("0.########");
            tbUom.Text             = priceListdetail.Uom.Code;
            tbTaxCode.Text         = priceListdetail.TaxCode;
            cbIsIncludeTax.Checked = priceListdetail.IsIncludeTax;
            //  cbIsProvEst.Checked = priceListdetail.IsProvisionalEstimate;
        }
    }
Example #6
0
    protected void lbtnAdd_Click(object sender, EventArgs e)
    {
        FillInspectItemDic();
        Controls_TextBox tbItemCode   = (Controls_TextBox)((LinkButton)sender).Parent.FindControl("tbItemCode");
        TextBox          tbInspectQty = (TextBox)((LinkButton)sender).Parent.FindControl("tbInspectQty");

        com.Sconit.Control.CodeMstrDropDownList tbDefectClassification = (com.Sconit.Control.CodeMstrDropDownList)((LinkButton)sender).Parent.FindControl("tbDefectClassification");
        com.Sconit.Control.CodeMstrDropDownList tbDefectFactor         = (com.Sconit.Control.CodeMstrDropDownList)((LinkButton)sender).Parent.FindControl("tbDefectFactor");


        Item newItem = TheItemMgr.LoadItem(tbItemCode.Text.Trim());
        IList <BomDetail> bomDetailList = TheBomDetailMgr.GetFlatBomDetail(tbItemCode.Text.Trim(), DateTime.Now);

        foreach (BomDetail bomDetail in bomDetailList)
        {
            if (bomDetail.CalculatedQty == 0)
            {
                continue;
            }
            if (bomDetail.BackFlushMethod != BusinessConstants.CODE_MASTER_BACKFLUSH_METHOD_VALUE_BATCH_FEED)
            {
                if (InspectItemDic.ContainsKey(bomDetail.Item.Code + "-" + bomDetail.Bom.Code + "-" + tbDefectClassification.Text.Trim()))
                {
                    InspectItemDic[bomDetail.Item.Code + "-" + bomDetail.Bom.Code + "-" + tbDefectClassification.Text.Trim() + "-" + tbDefectFactor.Text.Trim()] += bomDetail.RateQty * decimal.Parse(tbInspectQty.Text.Trim());
                }
                else
                {
                    InspectItemDic.Add(bomDetail.Item.Code + "-" + bomDetail.Bom.Code + "-" + tbDefectClassification.Text.Trim() + "-" + tbDefectFactor.Text.Trim(), bomDetail.RateQty * decimal.Parse(tbInspectQty.Text.Trim()));
                }
            }
        }
        InitPageParameter();
    }
Example #7
0
    public void PageCleanup()
    {
        ((TextBox)(this.FV_WorkCenter.FindControl("tbCode"))).Text = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbName"))).Text = string.Empty;

        ((TextBox)(this.FV_WorkCenter.FindControl("tbLaborBurdenPercent"))).Text     = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbLaborBurdenRate"))).Text        = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupBurdenPercent"))).Text     = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupBurdenRate"))).Text        = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbLaborRate"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachine"))).Text                = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachineQty"))).Text             = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachineBurdenRate"))).Text      = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachineSetupBurdenRate"))).Text = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbRunCrew"))).Text                = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupCrew"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupRate"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbQueueTime"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbWaitTime"))).Text               = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbPercentEfficiency"))).Text      = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbPercentUtilization"))).Text     = string.Empty;
        ((CheckBox)(this.FV_WorkCenter.FindControl("tbIsActive"))).Checked           = false;
        ((Literal)(this.FV_WorkCenter.FindControl("lbCurrentParty"))).Text           = this.ParentCode;
        Controls_TextBox tbType = (Controls_TextBox)(this.FV_WorkCenter.FindControl("tbType"));

        tbType.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_WORKCENTER_TYPE;
        tbType.DataBind();
    }
Example #8
0
    protected void FV_Routing_DataBound(object sender, EventArgs e)
    {
        Controls_TextBox tbRegion = ((Controls_TextBox)(this.FV_Routing.FindControl("tbRegion")));

        tbRegion.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRegion.DataBind();
        this.UpdateView();
    }
Example #9
0
    protected void ODS_TransportationRouteDetail_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbTAddress = ((Controls_TextBox)(this.FV_TransportationRouteDetail.FindControl("tbTAddress")));

        transportationRouteDetail = (TransportationRouteDetail)e.InputParameters[0];
        transportationRouteDetail.TransportationAddress = TheTransportationAddressMgr.LoadTransportationAddress(GetTransportationAddressId(tbTAddress.Text.Trim()));
        transportationRouteDetail.TransportationRoute   = TheTransportationRouteMgr.LoadTransportationRoute(this.TransportationRouteCode);
    }
Example #10
0
    protected void ODS_TransportPriceList_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbParty = ((Controls_TextBox)(this.FV_TransportPriceList.FindControl("tbParty")));

        transportPriceList       = (TransportPriceList)e.InputParameters[0];
        transportPriceList.Code  = transportPriceList.Code.Trim();
        transportPriceList.Party = ThePartyMgr.LoadParty(tbParty.Text.Trim());
    }
Example #11
0
    private void UpdateView(Shelf shelf)
    {
        Controls_TextBox tbProductLine = (Controls_TextBox)this.FV_Shelf.FindControl("tbProductLine");

        tbProductLine.ServiceParameter = "string:" + this.CurrentUser.Code + ",bool:true";
        tbProductLine.DataBind();
        tbProductLine.Text = shelf.ProductLine.Code;
    }
Example #12
0
    protected void ODS_Routing_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox     tbRegion       = ((Controls_TextBox)(this.FV_Routing.FindControl("tbRegion")));
        CodeMstrDropDownList ddlRoutingType = ((CodeMstrDropDownList)(this.FV_Routing.FindControl("ddlRoutingType")));
        Routing routing = (Routing)e.InputParameters[0];

        routing.Type   = ddlRoutingType.SelectedValue;
        routing.Region = TheRegionMgr.LoadRegion(tbRegion.Text);
    }
Example #13
0
    private void UpdateView()
    {
        Routing              routing        = TheRoutingMgr.LoadRouting(RoutingCode);
        Controls_TextBox     tbRegion       = ((Controls_TextBox)(this.FV_Routing.FindControl("tbRegion")));
        CodeMstrDropDownList ddlRoutingType = ((CodeMstrDropDownList)(this.FV_Routing.FindControl("ddlRoutingType")));

        tbRegion.Text = routing.Region == null ? string.Empty : routing.Region.Code;
        ddlRoutingType.SelectedValue = routing.Type;
    }
Example #14
0
    private bool buildMiscOrderDetails(bool saveHead)
    {
        bool result   = true;
        int  rowCount = saveHead ? this.MiscOrderDetailsGV.Rows.Count - 1 : this.MiscOrderDetailsGV.Rows.Count;
        IList <MiscOrderDetail> miscOrderDetails = new List <MiscOrderDetail>();

        for (int i = 0; i < rowCount; i++)
        {
            MiscOrderDetail  miscOrderDetail = new MiscOrderDetail();
            Controls_TextBox tbItemCode      = this.MiscOrderDetailsGV.Rows[i].FindControl("tbItemCode") as Controls_TextBox;
            if (tbItemCode.Text.Length == 0)
            {
                Label lblItemCode = this.MiscOrderDetailsGV.Rows[i].FindControl("lblItemCode") as Label;
                if (lblItemCode.Text.Length == 0)
                {
                    continue;
                }
                else
                {
                    miscOrderDetail.Item = TheItemMgr.LoadItem(lblItemCode.Text);
                }
            }
            else
            {
                miscOrderDetail.Item = TheItemMgr.LoadItem(tbItemCode.Text);
            }

            TextBox tbGridQtyTextBox = this.MiscOrderDetailsGV.Rows[i].FindControl("tbQty") as TextBox;
            string  gridRowInputQty  = tbGridQtyTextBox.Text.Trim();
            //int m;
            //if (!int.TryParse(gridRowInputQty, out m))
            //{
            //    ShowErrorMessage("MasterData.MiscOrder.WarningMessage.InputNoIntegerValue");
            //    result = false;
            //}
            //decimal InputQty = decimal.Parse(gridRowInputQty);
            //if ((this.ModuleType.Equals(BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_GI)
            //    || this.ModuleType.Equals(BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_GR)) && InputQty <= 0)
            //{
            //    ShowErrorMessage("MasterData.MiscOrder.WarningMessage.InputQtyMustThanZero");
            //    result = false;
            //    return result;
            //}
            //if (this.ModuleType.Equals(BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_ADJ) && InputQty == 0)
            //{
            //    ShowErrorMessage("MasterData.MiscOrder.WarningMessage.InputQtyDontEqualsZero");
            //    result = false;
            //    return result;
            //}
            miscOrderDetail.Qty = decimal.Parse(tbGridQtyTextBox.Text.Trim());

            miscOrderDetail.IsBlankDetail = false;
            miscOrderDetails.Add(miscOrderDetail);
        }
        MiscOrder.MiscOrderDetails = miscOrderDetails;
        return(result);
    }
Example #15
0
    public void PageCleanup()
    {
        ((TextBox)(this.FV_Routing.FindControl("tbCode"))).Text         = string.Empty;
        ((TextBox)(this.FV_Routing.FindControl("tbDescription"))).Text  = string.Empty;
        ((CheckBox)(this.FV_Routing.FindControl("cbIsActive"))).Checked = true;
        Controls_TextBox tbRegion = ((Controls_TextBox)(this.FV_Routing.FindControl("tbRegion")));

        tbRegion.Text = string.Empty;
    }
Example #16
0
    public void UpdateView()
    {
        InProcessLocation ip = TheInProcessLocationMgr.LoadInProcessLocation(this.IpNo);
        Controls_TextBox  tbCurrentOperation = (Controls_TextBox)this.FV_InProcessLocation.FindControl("tbCurrentOperation");
        TextBox           tbCurrentActivity  = (TextBox)this.FV_InProcessLocation.FindControl("tbCurrentActivity");

        tbCurrentOperation.Text = ip.CurrentOperation.ToString();
        tbCurrentActivity.Text  = ip.CurrentActivity;
    }
Example #17
0
    protected void ODS_Shelf_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbProductLine = (Controls_TextBox)this.FV_Shelf.FindControl("tbProductLine");
        TextBox          tbCapacity    = (TextBox)this.FV_Shelf.FindControl("tbCapacity");

        shelf             = (Shelf)e.InputParameters[0];
        shelf.Code        = shelf.Code.Trim();
        shelf.ProductLine = TheFlowMgr.LoadFlow(tbProductLine.Text.Trim());
        shelf.TagNo       = shelf.TagNo.Trim();
    }
Example #18
0
    protected void ODS_TransportationRoute_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbShipFrom = ((Controls_TextBox)(this.FV_TransportationRoute.FindControl("tbShipFrom")));
        Controls_TextBox tbShipTo   = ((Controls_TextBox)(this.FV_TransportationRoute.FindControl("tbShipTo")));

        transportationRoute             = (TransportationRoute)e.InputParameters[0];
        transportationRoute.Code        = transportationRoute.Code.Trim();
        transportationRoute.Description = transportationRoute.Description.Trim();
        transportationRoute.ShipFrom    = TheTransportationAddressMgr.LoadTransportationAddress(GetTransportationAddressId(tbShipFrom.Text.Trim()));
        transportationRoute.ShipTo      = TheTransportationAddressMgr.LoadTransportationAddress(GetTransportationAddressId(tbShipTo.Text.Trim()));
    }
Example #19
0
    protected void CheckAllItem(object source, ServerValidateEventArgs args)
    {
        Controls_TextBox tbLocFrom         = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo           = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");
        Controls_TextBox tbRefFlow         = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        CustomValidator  cvCheckDetailItem = (CustomValidator)this.FV_Flow.FindControl("cvCheckDetailItem");

        if (tbRefFlow != null && tbRefFlow.Text.Trim() != string.Empty)
        {
            Flow flow = TheFlowMgr.LoadFlow(FlowCode);

            List <FlowDetail> flowDetailList    = (List <FlowDetail>)TheFlowDetailMgr.GetFlowDetail(flow);
            List <FlowDetail> refFlowDetailList = (List <FlowDetail>)TheFlowDetailMgr.GetFlowDetail(tbRefFlow.Text.Trim());
            if (!FlowHelper.CheckDetailSeqExists(flowDetailList, refFlowDetailList))
            {
                args.IsValid = false;
                ShowErrorMessage("MasterData.Flow.RefFlow.Sequence.Exists");
                return;
            }
            ;


            List <string[]> itemList = new List <string[]>();
            foreach (FlowDetail flowDetail in flowDetailList)
            {
                string[] item = new string[5];
                item[0] = flowDetail.Item.Code;
                item[1] = flowDetail.Uom.Code;
                item[2] = flowDetail.DefaultLocationFrom != null ? flowDetail.DefaultLocationFrom.Code : string.Empty;
                item[3] = flowDetail.DefaultLocationTo != null ? flowDetail.DefaultLocationTo.Code : string.Empty;
                item[4] = flowDetail.UnitCount.ToString();
                itemList.Add(item);
            }

            foreach (FlowDetail refFlowDetail in refFlowDetailList)
            {
                string[] item = new string[5];
                item[0] = refFlowDetail.Item.Code;
                item[1] = refFlowDetail.Uom.Code;
                item[2] = refFlowDetail.LocationFrom != null ? refFlowDetail.LocationFrom.Code : tbLocFrom.Text.Trim();
                item[3] = refFlowDetail.LocationTo != null ? refFlowDetail.LocationTo.Code : tbLocTo.Text.Trim();
                item[4] = refFlowDetail.UnitCount.ToString();
                if (!FlowHelper.CheckDetailItemExists(itemList, item))
                {
                    args.IsValid = false;
                    ShowErrorMessage("MasterData.Flow.FlowDetail.Item.Code.Exists", item[0]);
                }
                else
                {
                    itemList.Add(item);
                }
            }
        }
    }
Example #20
0
    protected void FV_WorkCenter_DataBound(object sender, EventArgs e)
    {
        WorkCenter wc = TheWorkCenterMgr.LoadWorkCenter(this.WorkCenterCode);

        ((Literal)(this.FV_WorkCenter.FindControl("lbCurrentParty"))).Text = wc.Party.Code;
        Controls_TextBox tbType = (Controls_TextBox)(this.FV_WorkCenter.FindControl("tbType"));

        tbType.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_WORKCENTER_TYPE;
        tbType.DataBind();
        tbType.Text = wc.Type;
    }
Example #21
0
    protected void ODS_Shelf_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Shelf            oldShelef     = TheShelfMgr.LoadShelf(this.Code);
        Shelf            shelf         = (Shelf)e.InputParameters[0];
        Controls_TextBox tbProductLine = (Controls_TextBox)this.FV_Shelf.FindControl("tbProductLine");

        shelf.ProductLine      = TheFlowMgr.LoadFlow(tbProductLine.Text.Trim());
        shelf.Capacity         = oldShelef.Capacity;
        shelf.CurrentCartons   = oldShelef.CurrentCartons;
        shelf.OriginalCartonNo = oldShelef.OriginalCartonNo;
        shelf.Code             = oldShelef.Code;
    }
Example #22
0
    protected void ODS_TransportPriceListDetail_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbCurrency = ((Controls_TextBox)(this.FV_WarehouseLease.FindControl("tbCurrency")));
        TextBox          tbEndDate  = ((TextBox)(this.FV_WarehouseLease.FindControl("tbEndDate")));

        transportPriceListDetail = (TransportPriceListDetail)e.InputParameters[0];
        transportPriceListDetail.TransportPriceList = TheTransportPriceListMgr.LoadTransportPriceList(this.TransportPriceListCode);
        transportPriceListDetail.Remark             = transportPriceListDetail.Remark.Trim();
        transportPriceListDetail.Currency           = TheCurrencyMgr.LoadCurrency(tbCurrency.Text.Trim());
        transportPriceListDetail.TaxCode            = transportPriceListDetail.TaxCode.Trim();
        transportPriceListDetail.EndDate            = tbEndDate.Text.Trim() == "" ? null : transportPriceListDetail.EndDate;
        transportPriceListDetail.Type = BusinessConstants.TRANSPORTATION_PRICELIST_DETAIL_TYPE_WAREHOUSELEASE;
    }
Example #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Controls_TextBox tbRefFlow   = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo   = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");

        tbPartyFrom.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS + ",string:" + this.CurrentUser.Code;
        tbPartyFrom.DataBind();
        tbPartyTo.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS + ",string:" + this.CurrentUser.Code;
        tbPartyTo.DataBind();
        tbRefFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRefFlow.DataBind();
    }
Example #24
0
    protected void ODS_Vehicle_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbCarrier = ((Controls_TextBox)(this.FV_Vehicle.FindControl("tbCarrier")));

        com.Sconit.Control.CodeMstrDropDownList ddlType = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_Vehicle.FindControl("ddlType")));

        vehicle             = (Vehicle)e.InputParameters[0];
        vehicle.Code        = vehicle.Code.Trim();
        vehicle.Carrier     = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        vehicle.Type        = ddlType.SelectedValue;
        vehicle.Driver      = vehicle.Driver.Trim();
        vehicle.MobilePhone = vehicle.MobilePhone.Trim();
    }
Example #25
0
    public void PageCleanup()
    {
        ((TextBox)(this.FV_Shelf.FindControl("tbCode"))).Text = string.Empty;
        ((Controls_TextBox)(this.FV_Shelf.FindControl("tbProductLine"))).Text = string.Empty;
        ((TextBox)(this.FV_Shelf.FindControl("tbTagNo"))).Text        = string.Empty;
        ((TextBox)(this.FV_Shelf.FindControl("tbCapacity"))).Text     = string.Empty;
        ((CheckBox)(this.FV_Shelf.FindControl("cbIsActive"))).Checked = true;

        Controls_TextBox tbProductLine = (Controls_TextBox)this.FV_Shelf.FindControl("tbProductLine");

        tbProductLine.ServiceParameter = "string:" + this.CurrentUser.Code + ",bool:true";
        tbProductLine.DataBind();
    }
Example #26
0
    protected void ODS_Expense_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbCarrier  = ((Controls_TextBox)(this.FV_Expense.FindControl("tbCarrier")));
        Controls_TextBox tbCurrency = ((Controls_TextBox)(this.FV_Expense.FindControl("tbCurrency")));

        expense            = (Expense)e.InputParameters[0];
        expense.Code       = expense.Code.Trim();
        expense.Carrier    = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        expense.CreateDate = DateTime.Now;
        expense.CreateUser = this.CurrentUser;
        expense.TaxCode    = expense.TaxCode.Trim();
        expense.Currency   = TheCurrencyMgr.LoadCurrency(tbCurrency.Text.Trim());
        expense.Remark     = expense.Remark.Trim();
    }
Example #27
0
    private bool savePreCheck()
    {
        Controls_TextBox tbItemCode = this.MiscOrderDetailsGV.Rows[0].FindControl("tbItemCode") as Controls_TextBox;

        if (tbItemCode.Text.Length <= 0)
        {
            Label lblItemCode = this.MiscOrderDetailsGV.Rows[0].FindControl("lblItemCode") as Label;
            if (lblItemCode.Text.Length <= 0)
            {
                return(false);
            }
        }
        return(true);
    }
Example #28
0
    protected void MiscOrderDetailsGV_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            MiscOrderDetail orderDetail = (MiscOrderDetail)e.Row.DataItem;
            if (MiscOrder.OrderNo != null)
            {
                ((Label)e.Row.FindControl("lblItemCode")).Visible           = true;
                ((Controls_TextBox)e.Row.FindControl("tbItemCode")).Visible = false;
                ((Label)e.Row.FindControl("lblQty")).Visible  = true;
                ((TextBox)e.Row.FindControl("tbQty")).Visible = false;

                ((LinkButton)e.Row.FindControl("lbtnAdd")).Visible    = false;
                ((LinkButton)e.Row.FindControl("lbtnDelete")).Visible = false;
            }
            else
            {
                if (orderDetail.IsBlankDetail)
                {
                    Controls_TextBox tbItemCode = ((Controls_TextBox)e.Row.FindControl("tbItemCode"));
                    tbItemCode.Visible = true;
                    tbItemCode.SuggestTextBox.Attributes.Add("onchange", "GenerateItem(this);");
                    //((Controls_TextBox)e.Row.FindControl("tbItemCode")).Visible = true;
                    ((LinkButton)e.Row.FindControl("lbtnAdd")).Visible    = true;
                    ((LinkButton)e.Row.FindControl("lbtnDelete")).Visible = false;



                    RegularExpressionValidator revQty = (RegularExpressionValidator)e.Row.FindControl("revQty");
                    revQty.Enabled = true;
                    if (this.ModuleType == BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_GI || this.ModuleType == BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_GR)
                    {
                        revQty.ValidationExpression = "^(0|([1-9]\\d*))(\\.\\d+)?$";
                        revQty.ErrorMessage         = "${MasterData.MiscOrder.WarningMessage.InputQtyMustThanZero}";
                    }
                    if (this.ModuleType == BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_ADJ)
                    {
                        revQty.ValidationExpression = "^(-)?(0|([1-9]\\d*))(\\.\\d+)?$";
                        revQty.ErrorMessage         = "${MasterData.MiscOrder.WarningMessage.InputQtyFormat.Error}";
                    }
                }
                else
                {
                    ((LinkButton)e.Row.FindControl("lbtnAdd")).Visible    = false;
                    ((LinkButton)e.Row.FindControl("lbtnDelete")).Visible = true;
                }
            }
        }
    }
Example #29
0
    private void UpdateView()
    {
        bom = TheBomMgr.LoadBom(this.code);
        Controls_TextBox tbUom    = (Controls_TextBox)(this.FV_Bom.FindControl("tbUom"));
        TextBox          tbRegion = (TextBox)(this.FV_Bom.FindControl("tbRegion"));

        if (bom.Uom != null)
        {
            tbUom.Text = bom.Uom.Code;
        }
        if (bom.Region != null)
        {
            tbRegion.Text = bom.Region.Code;
        }
    }
Example #30
0
    protected void FV_Routing_DataBound(object sender, EventArgs e)
    {
        if (FlowCode != null && FlowCode != string.Empty)
        {
            Flow flow = TheFlowMgr.LoadFlow(FlowCode);

            Controls_TextBox tbRouting    = (Controls_TextBox)(this.FV_Routing.FindControl("tbRouting"));
            Literal          lblRouting   = (Literal)this.FV_Routing.FindControl("lblRouting");
            Literal          lDescription = (Literal)(this.FV_Routing.FindControl("lDescription"));
            lblRouting.Text = FlowHelper.GetFlowRoutingLabel(this.ModuleType) + ":";
            if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION)
            {
                if (this.IsReturn)
                {
                    tbRouting.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_ROUTING_TYPE_VALUE_REWORK;
                }
                else
                {
                    tbRouting.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_ROUTING_TYPE_VALUE_PRODUCTION;
                }
                tbRouting.DataBind();
            }
            else
            {
                tbRouting.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_ROUTING_TYPE_VALUE_BINARY;
                tbRouting.DataBind();
            }
            if (!IsReturn)
            {
                if (flow.Routing != null)
                {
                    tbRouting.Text    = flow.Routing.Code;
                    lDescription.Text = flow.Routing.Description;
                    EditEvent(DoSearch(flow.Routing.Code, IsReturn), null);
                }
            }
            else
            {
                if (flow.ReturnRouting != null)
                {
                    lblRouting.Text   = "${MasterData.Flow.ReturnRouting}";
                    tbRouting.Text    = flow.ReturnRouting.Code;
                    lDescription.Text = flow.ReturnRouting.Description;
                    EditEvent(DoSearch(flow.ReturnRouting.Code, IsReturn), null);
                }
            }
        }
    }