Exemple #1
1
        private void FormatGrid()
        {
            grdDetails.Splits[0].ColumnCaptionHeight = 25;
            grdDetails.AllowColMove = false;
            grdDetails.AllowAddNew = true;
            FormatGridHeader(grdDetails);
            grdDetails.Splits[0].DisplayColumns["ID"].Width = 50;
            grdDetails.Splits[0].DisplayColumns["ID"].Locked = false;
            grdDetails.Splits[0].DisplayColumns["Product Name"].Width = 125;
            grdDetails.Splits[0].DisplayColumns["Product Name"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["TP"].Width = 60;
            grdDetails.Splits[0].DisplayColumns["Batch No"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Batch No"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["Exp. Date"].Width = 70;
            grdDetails.Splits[0].DisplayColumns["Mfg. Date"].Width = 70;
            grdDetails.Splits[0].DisplayColumns["Qty"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Pack"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Pack"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Type"].Width = 50;
            grdDetails.Columns["Type"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.SortedComboBox;
            var c1_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c1_vItem.Value = "Stock";
            grdDetails.Columns["Type"].ValueItems.Values.Add(c1_vItem);
            var c2_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c2_vItem.Value = "Bonus";
            grdDetails.Columns["Type"].ValueItems.Values.Add(c2_vItem);
            var c3_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c3_vItem.Value = "Breakage";
            grdDetails.Columns["Type"].ValueItems.Values.Add(c3_vItem);
            var c4_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c4_vItem.Value = "Expiry";
            grdDetails.Columns["Type"].ValueItems.Values.Add(c4_vItem);
            grdDetails.Splits[0].DisplayColumns["Type"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Disc %"].Width = 55;
            grdDetails.Splits[0].DisplayColumns["Disc %"].Locked = false;
            grdDetails.Splits[0].DisplayColumns["Discount"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Discount"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["Sale Tax"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Sale Tax"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["Net"].Width = 70;
            grdDetails.Splits[0].DisplayColumns["Net"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["STaxValue"].Visible = false;
            grdDetails.Splits[0].DisplayColumns["STaxValue"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["SaleTaxPer"].Visible = false;
            grdDetails.Splits[0].DisplayColumns["SaleTaxPer"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["GrossValue"].Visible = false;
            grdDetails.Splits[0].DisplayColumns["GrossValue"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["CostRate"].Visible = false;
            grdDetails.Splits[0].DisplayColumns["CostRate"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["FlatRate"].Visible = false;
            grdDetails.Splits[0].DisplayColumns["FlatRate"].Locked = true;
            grdDetails.Splits[0].DisplayColumns["AvgRate"].Visible = false;
            grdDetails.Splits[0].DisplayColumns["AvgRate"].Locked = true;
            grdDetails.Columns["Exp. Date"].EditMask = "##/##/####";
            grdDetails.Columns["Exp. Date"].EditMaskUpdate = true;
            grdDetails.Splits[0].DisplayColumns["Exp. Date"].Locked = true;
            grdDetails.Columns["Mfg. Date"].EditMask = "##/##/####";
            grdDetails.Columns["Mfg. Date"].EditMaskUpdate = true;
            grdDetails.Splits[0].DisplayColumns["Mfg. Date"].Locked = true;
        }
Exemple #2
0
        public void List()
        {
            try
            {
                dt = new DataTable();
                DataColumn dc;

                dt = new CL_Perfil().Obtener(0, null);
                dc = new DataColumn("Imagen", typeof(string)); dt.Columns.Add(dc);

                foreach (DataRow dr in dt.Rows)
                {
                    dr["Imagen"] = "     Imagen";//new BaseFunctions().GetImageFromByteArray(new BaseFunctions().Image2Bytes(Properties.Resources.record));
                }
                C1.Win.C1TrueDBGrid.ValueItemCollection v    = this.c1TrueDBGrid1.Columns["Imagen"].ValueItems.Values;
                C1.Win.C1TrueDBGrid.ValueItem           Item = new C1.Win.C1TrueDBGrid.ValueItem();

                Item.Value        = "     Imagen";
                Item.DisplayValue = Properties.Resources.record;
                v.Add(Item);
                this.c1TrueDBGrid1.SetDataBinding(dt, "", true);
                this.c1TrueDBGrid1.Columns.Add(new C1DataColumn("Imagen", "Imagen", typeof(byte[])));

                this.c1TrueDBGrid1.Columns["Imagen"].ValueItems.Translate = true;

                this.InitializeCounter();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\nMetodo : List()", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void FormatGrid()
        {
            grdDetails.Splits[0].ColumnCaptionHeight = 25;
            grdDetails.AllowColMove = false;
            grdDetails.AllowAddNew = true;
            FormatGridHeader(grdDetails);
            grdDetails.Splits[0].DisplayColumns["Inv.Id"].Width = 70;
            grdDetails.Splits[0].DisplayColumns["Inv.Id"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Inv. Date"].Width = 70;
            grdDetails.Splits[0].DisplayColumns["Inv. Date"].Locked = true;

            grdDetails.Columns["Inv. Date"].EditMask = "##/##/####";
            grdDetails.Columns["Inv. Date"].EditMaskUpdate = true;

            grdDetails.Splits[0].DisplayColumns["Customer"].Width = 100;
            grdDetails.Splits[0].DisplayColumns["Customer"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Status"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Status"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Amount"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Amount"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Cheque"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Cheque"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Return"].Width = 55;
            grdDetails.Splits[0].DisplayColumns["Return"].Locked = false;

            grdDetails.Splits[0].DisplayColumns["Credit"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Credit"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Comm."].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Comm."].Locked = false;

            grdDetails.Splits[0].DisplayColumns["DueDate"].Width = 70;
            grdDetails.Splits[0].DisplayColumns["DueDate"].Locked = true;

            grdDetails.Columns["DueDate"].EditMask = "##/##/####";
            grdDetails.Columns["DueDate"].EditMaskUpdate = true;

            grdDetails.Splits[0].DisplayColumns["OCGroupId"].Visible = true;
            grdDetails.Splits[0].DisplayColumns["OCGroupId"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["ChqRound"].Visible = true;
            grdDetails.Splits[0].DisplayColumns["ChqRound"].Locked = true;

            grdDetails.Splits[0].DisplayColumns["Cash"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Cash"].Locked = false;

            grdDetails.Splits[0].DisplayColumns["Status"].Width = 65;
            grdDetails.Splits[0].DisplayColumns["Status"].Locked = false;
            grdDetails.Columns["Status"].ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.SortedComboBox;

            var c1_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c1_vItem.Value = "Adj";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c1_vItem);

            var c2_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c2_vItem.Value = "Cash";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c2_vItem);

            var c3_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c3_vItem.Value = "Cheque";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c3_vItem);

            var c4_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c4_vItem.Value = "Credit";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c4_vItem);

            var c5_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c5_vItem.Value = "Credit Note";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c5_vItem);

            var c6_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c6_vItem.Value = "Ins";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c6_vItem);

            var c7_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c7_vItem.Value = "Online";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c7_vItem);

            var c8_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c8_vItem.Value = "Pending";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c8_vItem);

            var c9_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c9_vItem.Value = "Receipt";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c9_vItem);

            var c10_vItem = new C1.Win.C1TrueDBGrid.ValueItem();
            c10_vItem.Value = "SaleBase";
            grdDetails.Columns["Status"].ValueItems.Values.Add(c10_vItem);
        }