protected void btnSaveExchange_Click(object sender, EventArgs e)
 {
     _exchangeHeader = AddExchange1.ExchangeHeader;
     _addExchange = false;
     SetAvtiveView(vwMainIndex);
     CopyExchangeList();
     gvSpareList.DataBind();
 }
    private void ShowServiceSheet(bool readOnly, Serviceheader serH)
    {
        _finish = readOnly;
        readOnlyForm = readOnly;
        AddExchange1.readOnlyMode = readOnly;

        if (serH != null)
        {
            //_exchangeHeader = RepairListDataSource.GetExchangeHeaderFromServiceSheet(serH.Id);

            #region header section
            // warranty info
            // WarrantyInfo warrInfo = ServiceTools.GetWarrantyInfo(serH.Enginenumber);

            _sVehileColor = serH.Colorcode;
            _sVehicleDealer = serH.Dealercode;
            _sVehicleType = serH.Itemtype;
            _feeAmount = serH.Feeamount.ToString();

            txtSheetNo.Text = serH.Servicesheetnumber;
            txtEngineNo.Text = serH.Enginenumber;

            txtErrorStatus.Text = serH.Damaged;
            txtRepair.Text = serH.Repairresult;

            viewmodeDealer = serH.Dealercode;
            if (ListContainsValue(ddlDealer.Items, viewmodeDealer)) ddlDealer.SelectedValue = viewmodeDealer;
            else ddlDealer.Items.Clear();
            GetBranchs();

            btnCheck_Click(null, null); // donot clear
            EnableButtonAfterCheck(true, true);

            // service type
            bool maint = false, rep = false, warr = false;
            switch ((ServiceType)serH.Servicetype)
            {
                case ServiceType.Repair: rep = true; break;
                case ServiceType.Warranty: warr = true; break;
                case ServiceType.Maintain: maint = true; break;
                case ServiceType.MaintainAndRepair: maint = true; rep = true; break;
                case ServiceType.MaintainAndWarranty: maint = true; warr = true; break;
                case ServiceType.WarrantyAndRepair: warr = true; rep = true; break;
                case ServiceType.RepairAndMaintainAndWarranty: maint = true; rep = true; warr = true; break;
            }
            chblSerList.Items[0].Selected = maint; chblSerList.Items[1].Selected = rep; chblSerList.Items[2].Selected = warr;
            #endregion

            gvSpareList.DataSourceTable.Rows.Clear();

            #region repair section
            _feeAmount = serH.Feeamount.ToString();

            // service detail: spares
            RepairListDataSource ds = new RepairListDataSource();
            ArrayList serDs = ds.GetServiceDetails(serH.Id);
            for (int i = 0; i < serDs.Count; i++)
            {
                Servicedetail serD = (Servicedetail)serDs[i];
                DataRow row = gvSpareList.DataSourceTable.NewRow();
                Warrantycondition spareInfo = WarrantyContent.GetWarrantyCondition(serD.Partcode);

                row["SpareNo"] = i + 1;
                row["SpareNumber"] = serD.Partcode;
                row["Quantity"] = serD.Partqty;
                row["SpareCost"] = serD.Unitprice;
                row["IsExchangeSpare"] = string.Empty;
                row["ItemId"] = serD.Id;

                if (spareInfo != null)
                {
                    row["SpareNameEn"] = spareInfo.Partnameen;
                    row["SpareNameVn"] = spareInfo.Partnamevn;
                    row["SpareName"] = (Thread.CurrentThread.CurrentCulture.Name == "vi-VN") ? spareInfo.Partnamevn : spareInfo.Partnameen;
                }
                else
                {
                    row["SpareNameEn"] = serD.Partname;
                    row["SpareNameVn"] = serD.Partname;
                    row["SpareName"] = serD.Partname;
                }

                CalculateAmount(row, null);
                gvSpareList.DataSourceTable.Rows.Add(row);
            }
            #endregion

            #region exchangeSection
            if (ds == null) ds = new RepairListDataSource();
            Exchangepartheader exch = ds.GetExchangeHeader(serH.Id);
            _exchangeHeader = exch;
            if (exch != null)
            {
                AddExchange1.ExchangeHeader = _exchangeHeader;
                AddExchange1.InitUC();
                AddExchange1.SpareList.Rows.Clear();

                ArrayList exchDs = ds.GetExchangeDetails(exch.Id);
                AddExchange1.RawSpareList = AddExchange.SpareListOnServiceSchema;

                for (int i = 0; i < exchDs.Count; i++)
                {
                    Exchangepartdetail exchD = (Exchangepartdetail)exchDs[i];
                    Warrantycondition spareInfo = WarrantyContent.GetWarrantyCondition(exchD.Partcodem);

                    #region Display on SRS
                    DataRow row = gvSpareList.DataSourceTable.NewRow();
                    row["SpareNo"] = i + 1;
                    row["SpareNumber"] = exchD.Partcodem;
                    row["Quantity"] = exchD.Partqtym;
                    row["SpareCost"] = exchD.Unitpricem;
                    row["ExchangeNumber"] = exch.Vouchernumber;
                    row["IsExchangeSpare"] = "true";
                    row["ItemId"] = exchD.Id;
                    if (spareInfo != null)
                    {
                        row["SpareNameEn"] = spareInfo.Partnameen;
                        row["SpareNameVn"] = spareInfo.Partnamevn;
                        row["SpareName"] = (Thread.CurrentThread.CurrentCulture.Name == "vi-VN") ? spareInfo.Partnamevn : spareInfo.Partnameen;
                    }
                    else
                    {
                        row["SpareNameEn"] = Message.DataLost;
                        row["SpareNameVn"] = Message.DataLost;
                        row["SpareName"] = Message.DataLost;
                    }

                    //_feeAmount = exch.Feeamount.ToString();
                    //CalculateAmount(row, null);
                    gvSpareList.DataSourceTable.Rows.InsertAt(row, 0);
                    #endregion

                    #region display on PCV
                    row = AddExchange1.RawSpareList.NewRow();

                    row["ItemId"] = exchD.Id;
                    row["SpareNo"] = i + 1;
                    row["SpareNumber"] = exchD.Partcodem;
                    row["Quantity"] = exchD.Partqtym;
                    row["BrokenCode"] = exchD.Broken.Brokencode;
                    row["SerialNumber"] = exchD.Serialnumber;

                    AddExchange1.AddNewItem(row);
                    AddExchange1.RawSpareList.Rows.Add(row);
                    #endregion
                }
            }
            #endregion

            CalculateTotalAmount();
            gvSpareList.DataBind();
            CheckFinish();

            // cust info n' buy date
            _custInfo = serH.Customer;
            ShowCustInfo();
            txtRepairDate.Text = (serH.Servicedate > DateTime.MinValue) ? serH.Servicedate.ToShortDateString() : "";
        }
    }
 // user cancel select an item
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     if ((_addExchange) && (MultiView1.ActiveViewIndex == vwAddExchangeIndex))
     {
         SetAvtiveView(vwMainIndex);
         _addExchange = false;
     }
     else if (_addExchange)
     {
         SetAvtiveView(vwAddExchangeIndex);
         if (AddExchange1.ExchangeHeader != null) _exchangeHeader = AddExchange1.ExchangeHeader;
     }
     else { SetAvtiveView(vwMainIndex); }
 }
    private bool SaveExchangeSpares(ServiceStatus status, Exchangepartheader exchH, Serviceheader serH, DataTable spareList, long totalFee)
    {
        WarrantyContentErrorCode err = WarrantyContentErrorCode.OK;
        _exchSaved = false;

        // check for any exchange spares exist
        // ret true if no one to save
        if ((exchH == null) || (spareList == null) || (spareList.Rows.Count < 1)) return true;

        // save header
        for (int i = 0; i < 5; i++) // try 5 time to ensure
        {
            err = AddExchange.SaveExchHeader(status, UserHelper.AreaCode, CurrentDealer, exchH, serH, totalFee);
            if (err == WarrantyContentErrorCode.OK) break;
        }
        if (err != WarrantyContentErrorCode.OK) { AddError(err); return false; }

        // save detail
        err = AddExchange.SaveExchDetails(spareList, exchH);
        if (err != WarrantyContentErrorCode.OK) { AddError(err); return false; }

        _exchSaved = true;
        return true;
    }
    private void ShowExchangeVoucher()
    {
        readOnlyForm = true;
        AddExchange1.readOnlyMode = readOnlyForm;

        Exchangepartheader exH = RepairListDataSource.GetExchangeHeader(showExchangeSparesNumber);
        _exchangeHeader = exH;
        if (
            (exH == null) ||
            (UserHelper.IsDealer && (exH.Dealercode != UserHelper.DealerCode))
           )
        {
            AddError(WarrantyContentErrorCode.ExchangeNumberNotFound);
            SetAvtiveView(vwNoSheetToViewIndex);
        }
        else
        {
            viewmodeDealer = exH.Dealercode;
            AddExchange1.ExchangeHeader = exH;
            AddExchange1.InitUC();
            RepairListDataSource ds = new RepairListDataSource();
            ArrayList exDs = ds.GetExchangeDetails(exH.Id);
            if ((exDs != null) && (exDs.Count > 0))
            {
                DataTable tbl = AddExchange.SpareListOnServiceSchema;
                foreach (Exchangepartdetail exD in exDs)
                {
                    DataRow row = tbl.NewRow();
                    AddExchange1.GetSpareInfo(exD.Partcodem, row);
                    row["Quantity"] = exD.Partqtym;
                    row["SpareCost"] = exD.Unitpricem;
                    row["BrokenCode"] = exD.Broken.Brokencode;
                    row["SerialNumber"] = exD.Serialnumber;
                    AddExchange1.CalculateAmount(row, null);
                    tbl.Rows.Add(row);
                }
                AddExchange1.RawSpareList = tbl;
            }
            SetAvtiveView(vwAddExchangeIndex);
        }
    }
Ejemplo n.º 6
0
        public static WarrantyContentErrorCode SaveExchDetail(DataRow item, Exchangepartheader exchH, IDao<Exchangepartdetail, long> dao, IDao<Broken, long> daoB)
        {
            IList list;
            long eid;
            long.TryParse(item["ItemId"].ToString(), out eid);

            Exchangepartdetail exchD = dao.GetById(eid, true);
            if (exchD == null) exchD = new Exchangepartdetail();

            if (exchH == null) return WarrantyContentErrorCode.SaveExchDetailFailed;
            if (string.IsNullOrEmpty(item["BrokenCode"].ToString())) return WarrantyContentErrorCode.SaveExchDetailFailed;
            if (string.IsNullOrEmpty(item["SpareNumber"].ToString())) return WarrantyContentErrorCode.SaveExchDetailFailed;
            if (string.IsNullOrEmpty(item["Quantity"].ToString())) return WarrantyContentErrorCode.SaveExchDetailFailed;
            //if (string.IsNullOrEmpty(item["SerialNumber"].ToString())) return WarrantyContentErrorCode.SaveExchDetailFailed;
            if (string.IsNullOrEmpty(item["SpareCost"].ToString())) return WarrantyContentErrorCode.SaveExchDetailFailed;

            // get broken object
            daoB.SetCriteria(new ICriterion[] { Expression.Eq("Brokencode", item["BrokenCode"].ToString()) });
            list = daoB.GetAll();
            if (list.Count != 1) return WarrantyContentErrorCode.SaveExchDetailFailed;
            Broken broken = (Broken)list[0];
            long price; long.TryParse(item["SpareCost"].ToString(), out price);

            exchD.Broken = broken;
            exchD.Exchangepartheader = exchH;
            exchD.Partcodem = item["SpareNumber"].ToString();
            exchD.Partcodeo = item["SpareNumber"].ToString();
            exchD.Partqtym = Convert.ToInt32(item["Quantity"].ToString());
            exchD.Partqtyo = exchD.Partqtym;
            //exchD.Serialnumber = ((item["SerialNumber"] == null) || (item["SerialNumber"].ToString().Trim() == "")) ? "�" : item["SerialNumber"].ToString();
            exchD.Serialnumber = item["SerialNumber"].ToString();
            exchD.Unitpricem = price;
            exchD.Unitpriceo = price;
            long.TryParse(item["FeeAmount"].ToString(), out price);
            exchD.Totalfeem = price;
            exchD.Totalfeeo = price;

            try { dao.SaveOrUpdate(exchD); }
            catch { return WarrantyContentErrorCode.SaveDetailFailed; }
            return WarrantyContentErrorCode.OK;
        }
    protected void btnAddExchange_Click(object sender, EventArgs e)
    {
        bool initDataOk = true;
        DateTime dt;
        long km;

        // validate data
        //hdEngineNumber.Value = txtEngineNo.Text.Trim();
        if (_custInfo == null) { rqvCustName.IsValid = false; initDataOk = false; }
        if (string.IsNullOrEmpty(hdEngineNumber.Value)) { rqvEngineNumber.IsValid = false; initDataOk = false; }
        if (string.IsNullOrEmpty(txtRepairDate.Text)) { rqvRepairDate.IsValid = false; initDataOk = false; }
        if (string.IsNullOrEmpty(txtBuyDate.Text)) { rqvBuydate.IsValid = false; initDataOk = false; }
        if (!long.TryParse(txtKm.Text, out km)) { rgvKm.IsValid = false; initDataOk = false; }
        if (!(requireCheckWarrantyToAddPCV && CheckServiceTypeForPVC(GetSelectedServices())))
        {
            AddError(WarrantyContentErrorCode.InvalidServiceType);
            initDataOk = false;
        }

        if (!initDataOk) return;

        string strEngNo = hdEngineNumber.Value.Trim().ToUpper();

        // input data ok => show addExchange form
        SetAvtiveView(vwAddExchangeIndex);
        _addExchange = true;
        if (_exchangeHeader == null)
        {
            _exchangeHeader = new Exchangepartheader();
            _exchangeHeader.Damageddate = DateTime.Now;

            if (_dtVehicleMadedate > DateTime.MinValue)
            {
                _exchangeHeader.Exportdate = _dtVehicleMadedate;
            }
            else
            {
                Iteminstance item = AddExchange.GetItemInstance(strEngNo);
                if (item != null) _exchangeHeader.Exportdate = item.Madedate;
            }

            AddExchange1.ClearForm();
        }

        _exchangeHeader.Customer = _custInfo;
        if (DateTime.TryParse(txtBuyDate.Text, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out dt)) _exchangeHeader.Purchasedate = dt;
        if (DateTime.TryParse(txtRepairDate.Text, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out dt)) _exchangeHeader.Exchangeddate = dt;
        if (showTempSheetNo) _exchangeHeader.Vouchernumber = AddExchange.GenExchangeNumber(CurrentDealer);
        _exchangeHeader.Enginenumber = strEngNo;
        _exchangeHeader.Framenumber = txtFrameNumber.Text.Trim().ToUpper();
        _exchangeHeader.Kmcount = km;
        _exchangeHeader.Model = txtModel.Text.Trim().ToUpper();
        _exchangeHeader.Dealercode = CurrentDealer;

        AddExchange1.ExchangeHeader = _exchangeHeader;
        AddExchange1.InitUC();
    }
Ejemplo n.º 8
0
 public static WarrantyContentErrorCode SaveExchDetail(DataRow item, Exchangepartheader exchH)
 {
     IDao<Exchangepartdetail, long> dao = DaoFactory.GetDao<Exchangepartdetail, long>();
     IDao<Broken, long> daoB = DaoFactory.GetDao<Broken, long>();
     return SaveExchDetail(item, exchH, dao, daoB);
 }
Ejemplo n.º 9
0
        public static List<Exchangepartdetail> GetExPartDetailByExPartHeader(Exchangepartheader eph)
        {
            List<Exchangepartdetail> list = new List<Exchangepartdetail>();

            IDao<Exchangepartdetail, long> daoEpd = DaoFactory.GetDao<Exchangepartdetail, long>();
            daoEpd.SetCriteria(new ICriterion[] { Expression.Eq("Exchangepartheader", eph) });
            list = daoEpd.GetAll();
            return list;
        }
Ejemplo n.º 10
0
 public static WarrantyContentErrorCode SaveExchHeader(Exchangepartheader exchH, Serviceheader serH)
 {
     return SaveExchHeader((ServiceStatus)exchH.Status, null, null, exchH, serH, -1);
 }
Ejemplo n.º 11
0
        public static WarrantyContentErrorCode SaveExchHeader(ServiceStatus status, string area, string dealer, Exchangepartheader exchH, Serviceheader serH, long totalFee)
        {
            if (exchH == null) return WarrantyContentErrorCode.SaveExchHeaderFailed;

            IDao<Exchangepartheader, long> dao = DaoFactory.GetDao<Exchangepartheader, long>();
            //Exchangepartheader exchH = dao.GetById(eH.Id, true);
            //if (exchH == null) exchH = eH;

            try
            {
                if (serH != null) exchH.Serviceheader = serH;
                exchH.Customer = serH.Customer;
                exchH.Enginenumber = serH.Enginenumber;
                exchH.Framenumber = serH.Framenumber;
                if (!string.IsNullOrEmpty(area)) exchH.Areacode = area;
                if (!string.IsNullOrEmpty(dealer)) exchH.Dealercode = dealer;
                exchH.Status = (status != ServiceStatus.Temp) ? (int)ExchangeVoucherStatus.New : (int)ExchangeVoucherStatus.Temp;
                exchH.Vouchernumber = GenExchangeNumber(status == ServiceStatus.Temp, exchH.Dealercode);
                if (totalFee >= 0)
                {
                    exchH.Feeamount = totalFee;
                }
                exchH.Proposefeeamount = exchH.Feeamount;
                dao.SaveOrUpdateCopy(exchH);
            }
            catch { return WarrantyContentErrorCode.SaveExchHeaderFailed; }
            //exchH.Vouchernumber = exchH.Vouchernumber;

            return WarrantyContentErrorCode.OK;
        }
Ejemplo n.º 12
0
 public static WarrantyContentErrorCode SaveExchHeader(string area, string dealer, Exchangepartheader exchH, Serviceheader serH, long totalFee)
 {
     return SaveExchHeader(ServiceStatus.Done, area, dealer, exchH, serH, totalFee);
 }
Ejemplo n.º 13
0
 public static WarrantyContentErrorCode SaveExchDetails(IList exDetail, Exchangepartheader eH)
 {
     IDao<Exchangepartdetail, long> dao = DaoFactory.GetDao<Exchangepartdetail, long>();
     try
     {
         foreach (PCVItem item in exDetail)
         {
             if ((item.State == ServiceItemState.Transient) || item.HasModified || (item.Exchangepartheader == null) || (item.Exchangepartheader.Id != eH.Id))
             {
                 Exchangepartdetail ed = item.Base();
                 dao.SaveOrUpdateCopy(ed);
             }
         }
     }
     catch { return WarrantyContentErrorCode.SaveDetailFailed; }
     return WarrantyContentErrorCode.OK;
 }
Ejemplo n.º 14
0
        public static WarrantyContentErrorCode SaveExchDetails(DataTable exchDetail, Exchangepartheader exchH)
        {
            IDao<Exchangepartdetail, long> dao = DaoFactory.GetDao<Exchangepartdetail, long>();
            IDao<Broken, long> daoB = DaoFactory.GetDao<Broken, long>();

            foreach (DataRow row in exchDetail.Rows)
            {
                if (SaveExchDetail(row, exchH, dao, daoB) != WarrantyContentErrorCode.OK) return WarrantyContentErrorCode.SaveDetailFailed;
            }
            return WarrantyContentErrorCode.OK;
        }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (_saved) // add new sheet
        {
            _finish = false;
            _saveTemp = false;
            _exchSaved = false;
            _canChangeBuyDate = true;
            _editSheetId = 0;
            _exchangeHeader = null;
            _feeAmount = "0";
            txtEngineNo.Text = "";
            btnSaveTemp.Enabled = true;

            CheckFinish();
            ClearForm();
        }
        else // save this sheet
        {
            if (!SaveSheet(ServiceStatus.Done)) return;
            btnCalculate.Enabled = false;
            btnSaveTemp.Enabled = false;
        }

        _saved = !_saved;
    }
Ejemplo n.º 16
0
 public void CollectData()
 {
     DateTime dt;
     long km;
     int road, weather, usage, speed;
     if (ExchangeHeader == null) ExchangeHeader = new Exchangepartheader();
     ExchangeHeader.Areacode = UserHelper.AreaCode;
     ExchangeHeader.Comments = txtexNote.Text.Trim();
     if ((ExchangeHeader.Customer == null) && (Cust != null)) ExchangeHeader.Customer = Cust;
     ExchangeHeader.Damaged = txtexDamage.Text.Trim();
     DateTime.TryParse(txtexDamagedDate.Text, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out dt); ExchangeHeader.Damageddate = dt;
     ExchangeHeader.Electric = txtexElectricalDmg.Text.Trim();
     ExchangeHeader.Engine = txtexEngineDmg.Text.Trim();
     ExchangeHeader.Enginenumber = txtexEngineNumber.Text.Trim().ToUpper();
     DateTime.TryParse(txtexRepairDate.Text, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out dt); ExchangeHeader.Exchangeddate = dt;
     DateTime.TryParse(txtexExportDate.Text, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out dt); ExchangeHeader.Exportdate = dt;
     ExchangeHeader.Feeamount = gvexSpareList.SumBy("FeeAmount");
     ExchangeHeader.Frame = txtexFrameDmg.Text.Trim();
     ExchangeHeader.Framenumber = txtexFrameNum.Text.Trim().ToUpper();
     long.TryParse(txtexKm.Text, out km); ExchangeHeader.Kmcount = km;
     ExchangeHeader.Model = txtexModel.Text.Trim().ToUpper();
     DateTime.TryParse(txtexBuyDate.Text, Thread.CurrentThread.CurrentCulture, DateTimeStyles.AllowWhiteSpaces, out dt); ExchangeHeader.Purchasedate = dt;
     ExchangeHeader.Reason = txtexReason.Text.Trim();
     int.TryParse(rblRoad.SelectedValue, out road); ExchangeHeader.Road = road;
     int.TryParse(rblSpeed.SelectedValue, out speed); ExchangeHeader.Speed = speed;
     int.TryParse(rblWeather.SelectedValue, out weather); ExchangeHeader.Weather = weather;
     int.TryParse(rblTransport.SelectedValue, out usage); ExchangeHeader.Usage = usage;
     //ExchangeHeader.Vouchernumber = AddExchange.GenExchangeNumber(txtexDealer.Text);
 }
 protected override void LoadControlState(object state)
 {
     if (state != null)
     {
         object[] ctlState = (object[])state;
         base.LoadControlState(ctlState[0]);
         _showSumary = (bool)ctlState[1];
         _feeAmount = (string)ctlState[2];
         _custInfo = (Customer)ctlState[3];
         _exchangeNumber = (string)ctlState[4];
         _finish = (bool)ctlState[5];
         _saved = (bool)ctlState[6];
         _addExchange = (bool)ctlState[7];
         _exchangeHeader = (Exchangepartheader)ctlState[8];
         _isVehicleOnTiptop = (bool)ctlState[9];
         _sVehicleType = (string)ctlState[10];
         _sVehileColor = (string)ctlState[11];
         _sVehicleDealer = (string)ctlState[12];
         _dtVehicleMadedate = (DateTime)ctlState[13];
         _editSheetId = (long)ctlState[14];
         _saveTemp = (bool)ctlState[15];
         _exchSaved = (bool)ctlState[16];
         _canChangeBuyDate = (bool)ctlState[17];
         _itemExist = (bool)ctlState[18];
         _sVehicleDB = (string)ctlState[19];
     }
 }
Ejemplo n.º 18
0
 public static VerifyExchangeErrorCode CanVerifyExchangePartHeader(Exchangepartheader exch, ExchangeVoucherStatus status)
 {
     VerifyExchangeErrorCode result = VerifyExchangeErrorCode.OK;
     switch (status)
     {
         case ExchangeVoucherStatus.Reject:
             result = VerifyExchangeErrorCode.CommentIsBlank; // chang may khong co part nao coi nhu ko dc verify
             IList<Exchangepartdetail> items = ExchangePartDetailDataSource.GetByExchangeHeader(exch.Id);
             foreach (Exchangepartdetail item in items)
             {
                 if (!string.IsNullOrEmpty(item.Vmepcomment))
                 {
                     result = VerifyExchangeErrorCode.OK;
                     break;
                 }
             }
             break;
         default:
             break;
     }
     return result;
 }