Пример #1
0
        public PartListCompositeType GetPartListById(int iIdPartList)
        {
            var et = new PartListCompositeType();

            param    = new SqlParameter[1];
            param[0] = new SqlParameter("@fiid_part_list", SqlDbType.Int)
            {
                Value = iIdPartList
            };
            DataTable dt = objDB.ExecStore("sp_getPartListById", param);

            et.iIdPart       = int.Parse(dt.Rows[0].ItemArray[0].ToString());
            et.iNumber       = dt.Rows[0].ItemArray[1].ToString();
            et.sDescription  = dt.Rows[0].ItemArray[2].ToString();
            et.bStatus       = bool.Parse(dt.Rows[0].ItemArray[4].ToString());
            et.iNumberClient = dt.Rows[0].ItemArray[3].ToString();
            return(et);
        }
Пример #2
0
        /// <summary>
        /// Obtiene todos los Tipos de Cambio
        /// </summary>
        /// <returns></returns>
        public List <PartListCompositeType> getAll()
        {
            var       lst = new List <PartListCompositeType>();
            DataTable dt  = objDB.Consult("sp_selectPartList");

            foreach (DataRow dr in dt.Rows)
            {
                var et = new PartListCompositeType
                {
                    iIdPart       = int.Parse(dr.ItemArray[0].ToString()),
                    iNumber       = dr.ItemArray[1].ToString(),
                    sDescription  = dr.ItemArray[2].ToString(),
                    bStatus       = bool.Parse(dr.ItemArray[4].ToString()),
                    iNumberClient = dr.ItemArray[3].ToString()
                };
                lst.Add(et);
            }
            return(lst);
        }
Пример #3
0
    private void Quote()
    {
        if (ddlPartListC.Items.Count > 0)
        {
            pnQuoteA.Visible   = true;
            pnQuoteNon.Visible = false;

            var plct = new DS.SAI.Data.PartListCompositeType();
            var plm  = new PartListManager();

            var ect = new DS.SAI.Data.ExchangeCompositeType();
            var em  = new ExchangeManager();

            var qct = new DS.SAI.Data.QuoteCompositeType();
            var qm  = new QuoteManager();

            qct.iExchange = int.Parse(lblIdExchange.Text.ToString());
            qct.iPartList = int.Parse(ddlPartListC.SelectedValue.ToString());
            plct          = plm.getPartListById(int.Parse(ddlPartListC.SelectedValue.ToString()));
            ect           = em.getExchangeById(int.Parse(lblIdExchange.Text));

            lblNoParC.Text       = plct.iNumber.ToString();
            lblClientC.Text      = ect.sClient.ToString();
            lblProyectC.Text     = ect.sProyect.ToString();
            lblDescriptionC.Text = ect.sDescription.ToString();

            if (qm.ExistQuoteDuplicate(qct))
            {
                qct = qm.getQuoteById(qct);

                txtDateIn.Text          = qct.dIn.ToShortDateString();
                txtDateProm.Text        = qct.dProm.ToShortDateString();
                txtDateOut.Text         = qct.dOut.ToShortDateString();
                txtSOPClientC.Text      = qct.SOPCliente;
                txtMoldC.Text           = qct.iMoldProt.ToString();
                txtMoldSC.Text          = qct.iMoldSerie.ToString();
                txtCFC.Text             = qct.iCF.ToString();
                txtDeviceC.Text         = qct.iDevice.ToString();
                txtObsoletC.Text        = qct.iObsolet.ToString();
                txtManEngC.Text         = qct.iEngMan.ToString();
                txtDesignC.Text         = qct.iDesign.ToString();
                txtComponentsC.Text     = qct.iComponents.ToString();
                txtOthersTitleWC.Text   = qct.sOthers.ToString();
                txtOthersWC.Text        = qct.iOthers.ToString();
                txtPaintC.Text          = qct.iPaint.ToString();
                txtEmpC.Text            = qct.iEmp.ToString();
                txtBankC.Text           = qct.iBank.ToString();
                txtPrue.Text            = qct.iOthersC.ToString();
                txtPoundC.Text          = qct.iPound.ToString();
                txtDelta1.Text          = qct.iDelta1.ToString();
                txtDelta2.Text          = qct.iDelta2.ToString();
                txtCost.Text            = qct.iCost.ToString();
                txtR1.Text              = qct.iFR1.ToString();
                txtR2.Text              = qct.iFR2.ToString();
                txtMoldPlazoC.Text      = qct.iMoldP.ToString();
                txtMoldProtC.Text       = qct.iMoldProtP.ToString();
                txtDateStart.Text       = qct.iStart.ToString();
                txtObsC.Text            = qct.sDescription.ToString();
                lblINVTotal.Text        = qct.iTotalInv.ToString();
                lblTotalPieceTotal.Text = qct.iTotalP.ToString();
                chkMoldC.Checked        = qct.bMoldProt;
                chkMoldSC.Checked       = qct.bMoldSerie;
                chkCFC.Checked          = qct.bCF;
                chkDeviceC.Checked      = qct.bDevice;
                chkObsoletC.Checked     = qct.bObsolet;
                chkManEngC.Checked      = qct.bEngMan;
                chkDesingC.Checked      = qct.bDesign;
                chkComponetsC.Checked   = qct.bComponents;
                chkOthersWC.Checked     = qct.bOthers;
                chkPaintC.Checked       = qct.bPaint;
                chkEmpC.Checked         = qct.bEmp;
                chkBankC.Checked        = qct.bBank;
                setVisibleChecked();
                BlockQuote();
                btnUpdateQuote.Visible        = true;
                btnUpdateQuoteGuardar.Visible = false;
                btnAddQuote.Visible           = false;
            }
            else
            {
                clearControlsQuote();
                UnblockQuote();
            }
        }
        else
        {
            pnQuoteA.Visible   = false;
            pnQuoteNon.Visible = true;
        }
    }