protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "CompositeKey")
     {
         e.Value = e.GetListSourceFieldValue("matricula").ToString() + e.GetListSourceFieldValue("curso").ToString();
     }
 }
 protected void grid_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "__Key")
     {
         e.Value = e.GetListSourceFieldValue("FirstName").ToString() + e.GetListSourceFieldValue("LastName").ToString();
     }
 }
コード例 #3
0
ファイル: GWIS.aspx.cs プロジェクト: ipulsajalah-zz/Merc2
 protected void gvPartSelections_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "QtyRemain")
     {
         int remain = e.GetListSourceFieldValue("Qty").ToInt32(0) - e.GetListSourceFieldValue("QtyUsed").ToInt32(0);
         e.Value = remain;
     }
 }
コード例 #4
0
ファイル: ReceiptVoucherEdit.ascx.cs プロジェクト: ewin66/dev
 protected void grdVouchersAmount_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "ConvertedAmount")
     {
         decimal debit        = Convert.ToDecimal(e.GetListSourceFieldValue("Debit"));
         decimal exchangeRate = Convert.ToDecimal(e.GetListSourceFieldValue("ExchangeRate"));
         e.Value = debit * exchangeRate;
     }
 }
コード例 #5
0
 protected void grid_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "Total")
     {
         decimal price    = (decimal)e.GetListSourceFieldValue("totQty");
         decimal quantity = (decimal)e.GetListSourceFieldValue("Price");
         e.Value = price * quantity;
     }
 }
コード例 #6
0
ファイル: MyPurchases.aspx.cs プロジェクト: tayduivn/WebSklad
 protected void detailGrid_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "Total")
     {
         decimal price    = (decimal)e.GetListSourceFieldValue("UnitPrice");
         int     quantity = Convert.ToInt32(e.GetListSourceFieldValue("Quantity"));
         e.Value = price * quantity;
     }
 }
コード例 #7
0
 protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "CompositeKey")
     {
         e.Value = String.Format("{0}{1}{2}{3}",
             e.GetListSourceFieldValue("periodo").ToString() , "&",
             e.GetListSourceFieldValue("idColaborador").ToString(), "&" );
     }
 }
コード例 #8
0
 protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "CompositeKey")
     {
         e.Value = String.Format("{0}{1}{2}{3}{4}",
             e.GetListSourceFieldValue("sucursal").ToString() , "-",
             e.GetListSourceFieldValue("puesto").ToString() , "-",
              e.GetListSourceFieldValue("tipoCalculoPago").ToString());
     }
 }
コード例 #9
0
 protected void gridDetails_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "CurrentPrice")
     {
         int    id            = e.ListSourceRowIndex;
         int    channelId     = Convert.ToInt32(e.GetListSourceFieldValue("ChannelId"));
         string monitoredName = e.GetListSourceFieldValue("MonitoredName").ToString();
         string monitoredUrl  = e.GetListSourceFieldValue("MonitoredUrl").ToString();
         e.Value = CanonMapping.GetCurrentMapPrice(channelId, monitoredName, monitoredUrl);
     }
 }
コード例 #10
0
 protected void grid_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "UnitPrice")
     {
         e.Value = CalcUnitPrice(e.GetListSourceFieldValue("ProductID"));
     }
     if (e.Column.FieldName == "Sum")
     {
         e.Value = CalcSum(e.GetListSourceFieldValue("UnitPrice"), e.GetListSourceFieldValue("UnitQty"));
     }
 }
コード例 #11
0
    protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
    {
        DateTimeOffset dto        = (DateTimeOffset)e.GetListSourceFieldValue("Date");
        string         timeZoneId = (string)e.GetListSourceFieldValue("TimeZoneId");

        switch (e.Column.FieldName)
        {
        case "DateTimeOffset":
            e.Value = dto.DateTime + " " + timeZoneId;
            break;
        }
    }
コード例 #12
0
    protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
    {
        if (e.Column.FieldName == "Total")
        {
            if (IsFirstRow(e))
            {
                previousValue = 0;
            }

            int quantity = (int)e.GetListSourceFieldValue("Quantity");
            int price    = (int)e.GetListSourceFieldValue("Price");
            previousValue = quantity * price - previousValue;
            e.Value       = previousValue;
        }
    }
コード例 #13
0
    protected void GridViewAlbaransver_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
    {
        var Cliente = (Clientes)Session["User"];

        if (Cliente == null)
        {
            ASPxWebControl.RedirectOnCallback("/Account/login.aspx");
        }

        string CodigoCliente = Cliente.Código;
        int    AutoCliente   = Cliente.AutoCliente;
        int    AutoArticulo  = Convert.ToInt32(e.GetListSourceFieldValue("AutoArtículo"));
        string resp          = (string)CommonFunction.Calculoalbaran(Convert.ToString(GridViewAlbaransver.GetRowValues(e.ListSourceRowIndex, "SerieAlbaran")), 5);

        if (e.Column.FieldName == "Importe")
        {
            var val = CommonFunction.Field(resp, 1, "&");
            if (!string.IsNullOrEmpty(val))
            {
                e.Value = Convert.ToDouble(CommonFunction.Field(resp, 1, "&"));
            }
        }
        else if (e.Column.FieldName == "ImporteIgic")
        {
            var val = CommonFunction.Field(resp, 2, "&");
            if (!string.IsNullOrEmpty(val))
            {
                e.Value = Convert.ToDouble(CommonFunction.Field(resp, 2, "&"));
            }
        }
    }
コード例 #14
0
    private bool IsFirstRow(ASPxGridViewColumnDataEventArgs e)
    {
        ASPxGridView grid     = e.Column.Grid;
        object       keyValue = e.GetListSourceFieldValue(grid.KeyFieldName);

        return(grid.FindVisibleIndexByKeyValue(keyValue) == 0);
    }
コード例 #15
0
 protected void gvMain_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "Files")
     {
         int pat = Convert.ToInt32(e.GetListSourceFieldValue("ID"));
         e.Value = pat;
     }
 }
コード例 #16
0
 protected void grid_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "Total")
     {
         //int price = (int)e.GetListSourceFieldValue("FLT_BILL_AMOUNT");
         //int quantity = Convert.ToInt32(e.GetListSourceFieldValue("Quantity"));
         e.Value = e.GetListSourceFieldValue("FLT_BILL_AMOUNT");
     }
 }
コード例 #17
0
    protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
    {
        if (e.Column.FieldName != "Month")
        {
            return;
        }
        DateTime tempDate = (DateTime)e.GetListSourceFieldValue("OrderDate");

        e.Value = tempDate.Month;
    }
コード例 #18
0
 protected void gvOrders_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "CustomDescription")
     {
         string   description = Convert.ToString(e.GetListSourceFieldValue("Description"));
         string[] items       = description.Split(';');
         for (int i = 0; i < items.Length; i++)
         {
             items[i] = String.Format("#{0}#", items[i]); //Wrap items with '#'
         }
         e.Value = String.Join(";", items);
     }
 }
コード例 #19
0
 protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "QRCodeValueUnbound")
     {
         string  barCodeText = e.GetListSourceFieldValue("QRCodeValue").ToString();
         BarCode barCode     = new BarCode()
         {
             Symbology = Symbology.QRCode, CodeBinaryData = Encoding.Default.GetBytes(barCodeText)
         };
         ImageConverter converter = new ImageConverter();
         e.Value = (byte[])converter.ConvertTo(barCode.BarCodeImage, typeof(byte[]));
     }
 }
コード例 #20
0
 protected void NetworkLatencyTestgrd_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "LatencyYellowThreshold")
     {
         Dictionary <object, int> lowerBoundStorage = Session["NetworkLatency"] as Dictionary <object, int>;
         if (lowerBoundStorage == null)
         {
             lowerBoundStorage         = new Dictionary <object, int>();
             Session["NetworkLatency"] = lowerBoundStorage;
         }
         object key = e.GetListSourceFieldValue(e.ListSourceRowIndex, "ID");
         if (lowerBoundStorage.ContainsKey(key))
         {
             e.Value = lowerBoundStorage[key];
         }
         else
         {
             e.Value = 0;
         }
     }
 }
コード例 #21
0
        protected void gvxPatients_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
        {
            ASPxGridView gvpatients = (ASPxGridView)sender;
            int          DoctorID   = int.Parse(gvpatients.GetMasterRowKeyValue().ToString());
            int          ClinicID   = int.Parse(((sender as ASPxGridView).NamingContainer as GridViewDetailRowTemplateContainer).Grid.GetMasterRowKeyValue().ToString());

            if (e.Column.FieldName == "Total Required")
            {
                PaymentRepository paymentRepository = new PaymentRepository();
                e.Value = paymentRepository.GetAllTeratmentByPatient(DoctorID, ClinicID, int.Parse(e.GetListSourceFieldValue("PatientID").ToString()));
            }
            else if (e.Column.FieldName == "Total Payed")
            {
                PaymentRepository paymentRepository = new PaymentRepository();
                e.Value = paymentRepository.GetAllPaymentReceitByPatient(DoctorID, ClinicID, int.Parse(e.GetListSourceFieldValue("PatientID").ToString()));
            }
            else if (e.Column.FieldName == "Total Deserved")
            {
                e.Value = decimal.Parse(e.GetListSourceFieldValue("Total Required").ToString()) - decimal.Parse(e.GetListSourceFieldValue("Total Payed").ToString());
            }
        }
コード例 #22
0
ファイル: ucBalanceInit.ascx.cs プロジェクト: ewin66/dev
        protected void grdBalanceLine_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
        {
            Guid key = Guid.Parse(e.GetListSourceFieldValue(e.ListSourceRowIndex, grdBalanceLine.KeyFieldName).ToString());

            if (e.Column.FieldName == "TransactionId.Code")
            {
                GeneralJournal generalJournal = session.GetObjectByKey <GeneralJournal>(key);

                if (generalJournal != null)
                {
                    e.Value = generalJournal.TransactionId.Code;
                }
            }
            else if (e.Column.FieldName == "TransactionId.Description")
            {
                GeneralJournal generalJournal = session.GetObjectByKey <GeneralJournal>(key);

                if (generalJournal != null)
                {
                    e.Value = generalJournal.TransactionId.Description;
                }
            }
        }
コード例 #23
0
 protected void gridDetails_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
 {
     if (e.Column.FieldName == "CurrentPrice")
     {
         int id = e.ListSourceRowIndex;
         int channelId = Convert.ToInt32(e.GetListSourceFieldValue("ChannelId"));
         string monitoredName = e.GetListSourceFieldValue("MonitoredName").ToString();
         string monitoredUrl = e.GetListSourceFieldValue("MonitoredUrl").ToString();
         e.Value = CanonMapping.GetCurrentMapPrice(channelId, monitoredName, monitoredUrl);
     }
 }
コード例 #24
0
    /// <summary>
    /// populate unbound fields e.g. est. time to warehouse (ETW) = ETA + 7 days
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gridOrder_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
    {
        if (e.Column.FieldName == "ETW")
        {
            if (e.GetListSourceFieldValue("ETA") != null)
            {
                string _eta = Convert.ToDateTime(e.GetListSourceFieldValue("ETA")).ToString("yyyy/MM/dd");
                e.Value = Convert.ToDateTime(_eta).AddDays(7);
            }
        }

    }
コード例 #25
0
        protected void ASPxGridView1_CustomUnboundColumnData(object sender, ASPxGridViewColumnDataEventArgs e)
        {
            int cccMeses  = (int)e.GetListSourceFieldValue("CCCMESES");
            decimal despJan = (decimal)e.GetListSourceFieldValue("DESPJAN");
            decimal despFev = (decimal)e.GetListSourceFieldValue("DESPFEV");
            decimal despMar = (decimal)e.GetListSourceFieldValue("DESPMAR");
            decimal despAbr = (decimal)e.GetListSourceFieldValue("DESPABR");
            decimal despMai = (decimal)e.GetListSourceFieldValue("DESPMAI");
            decimal despJun = (decimal)e.GetListSourceFieldValue("DESPJUN");
            decimal despJul = (decimal)e.GetListSourceFieldValue("DESPJUL");
            decimal despAgo = (decimal)e.GetListSourceFieldValue("DESPAGO");
            decimal despSet = (decimal)e.GetListSourceFieldValue("DESPSET");
            decimal despOut = (decimal)e.GetListSourceFieldValue("DESPOUT");
            decimal despNov = (decimal)e.GetListSourceFieldValue("DESPNOV");
            decimal despDez = (decimal)e.GetListSourceFieldValue("DESPDEZ");
            decimal didJan = (decimal)e.GetListSourceFieldValue("DIDJAN");
            decimal didFev = (decimal)e.GetListSourceFieldValue("DIDFEV");
            decimal didMar = (decimal)e.GetListSourceFieldValue("DIDMAR");
            decimal didAbr = (decimal)e.GetListSourceFieldValue("DIDABR");
            decimal didMai = (decimal)e.GetListSourceFieldValue("DIDMAI");
            decimal didJun = (decimal)e.GetListSourceFieldValue("DIDJUN");
            decimal didJul = (decimal)e.GetListSourceFieldValue("DIDJUL");
            decimal didAgo = (decimal)e.GetListSourceFieldValue("DIDAGO");
            decimal didSet = (decimal)e.GetListSourceFieldValue("DIDSET");
            decimal didOut = (decimal)e.GetListSourceFieldValue("DIDOUT");
            decimal didNov = (decimal)e.GetListSourceFieldValue("DIDNOV");
            decimal didDez = (decimal)e.GetListSourceFieldValue("DIDDEZ");
            decimal saldoJan = (decimal)e.GetListSourceFieldValue("SALDOJAN");
            decimal saldoFev = (decimal)e.GetListSourceFieldValue("SALDOFEV");
            decimal saldoMar = (decimal)e.GetListSourceFieldValue("SALDOMAR");
            decimal saldoAbr = (decimal)e.GetListSourceFieldValue("SALDOABR");
            decimal saldoMai = (decimal)e.GetListSourceFieldValue("SALDOMAI");
            decimal saldoJun = (decimal)e.GetListSourceFieldValue("SALDOJUN");
            decimal saldoJul = (decimal)e.GetListSourceFieldValue("SALDOJUL");
            decimal saldoAgo = (decimal)e.GetListSourceFieldValue("SALDOAGO");
            decimal saldoSet = (decimal)e.GetListSourceFieldValue("SALDOSET");
            decimal saldoOut = (decimal)e.GetListSourceFieldValue("SALDOOUT");
            decimal saldoNov = (decimal)e.GetListSourceFieldValue("SALDONOV");
            decimal saldoDez = (decimal)e.GetListSourceFieldValue("SALDODEZ");

            DateTime _date;

            if (dtCadastroIni.Value != null)
                _date = DateTime.Parse(dtCadastroIni.Value.ToString());
            else
                _date = DateTime.Now;

            string mes = _date.Month.ToString();
            List<string> meses = Control.CentroDeCustoCtrl.getPeriodoCentroCusto(int.Parse(mes), cccMeses);

            decimal saldoPeriodo = 0;
            decimal despesasPeriodo = 0;
            decimal programacaoPeriodo = 0;

            foreach (string s in meses)
            {
                switch (s)
                {
                    case "1": saldoPeriodo += saldoJan;
                        despesasPeriodo += didJan;
                        programacaoPeriodo += despJan;
                        break;
                    case "2": saldoPeriodo += saldoFev;
                        despesasPeriodo += didFev;
                        programacaoPeriodo += despFev;
                        break;
                    case "3": saldoPeriodo += saldoMar;
                        despesasPeriodo += didMar;
                        programacaoPeriodo += despMar;
                        break;
                    case "4": saldoPeriodo += saldoAbr;
                        despesasPeriodo += didAbr;
                        programacaoPeriodo += despAbr;
                        break;
                    case "5": saldoPeriodo += saldoMai;
                        despesasPeriodo += didMai;
                        programacaoPeriodo += despMai;
                        break;
                    case "6": saldoPeriodo += saldoJun;
                        despesasPeriodo += didJun;
                        programacaoPeriodo += despJun;
                        break;
                    case "7": saldoPeriodo += saldoJul;
                        despesasPeriodo += didJul;
                        programacaoPeriodo += despJul;
                        break;
                    case "8": saldoPeriodo += saldoAgo;
                        despesasPeriodo += didAgo;
                        programacaoPeriodo += despAgo;
                        break;
                    case "9": saldoPeriodo += saldoSet;
                        despesasPeriodo += didSet;
                        programacaoPeriodo += despSet;
                        break;
                    case "10": saldoPeriodo += saldoOut;
                        despesasPeriodo += didOut;
                        programacaoPeriodo += despOut;
                        break;
                    case "11": saldoPeriodo += saldoNov;
                        despesasPeriodo += didNov;
                        programacaoPeriodo += despNov;
                        break;
                    case "12": saldoPeriodo += saldoDez;
                        despesasPeriodo += didDez;
                        programacaoPeriodo += despDez;
                        break;
                }
            }

            if (e.Column.FieldName == "SALDO") {
                e.Value = saldoPeriodo;
            }

            if (e.Column.FieldName == "Programação")
            {
                e.Value = programacaoPeriodo;
            }

            if (e.Column.FieldName == "Despesas")
            {
                e.Value = despesasPeriodo;
            }
        }