コード例 #1
0
 private void SetDefaults()
 {
     lblItem.Text     = mobjItem.ItemID;
     lblItemDesc.Text = mobjItem.Description;
     //lblQuantity.Text = mobjItem.AvailableInventory == 0 ? "0" : mobjItem.AvailableInventory.ToString("#,##0.####");//I was getting an "input string in incorrect format" exception on the client (not development machine) when this returned a 0
     lblQuantity.Text     = mobjItem.AvailableInventory.ToString("#,#;( #,# );**Zero**");
     lblLastReceived.Text = mobjItem.LastReceiveDate;
     lblLastShipped.Text  = mobjItem.LastShipDate;
     lblQtySelected.Text  = SelectedTotal.ToString("#,#;( #,# );**Zero**");
 }
コード例 #2
0
        private void dgvSelectAll_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewCheckBoxCell objCheckBoxCell = (DataGridViewCheckBoxCell)dgvItemHistory[e.ColumnIndex, e.RowIndex];
            int intTemp;


            if (!IsHeaderCheckBoxClicked)
            {
                RowCheckBoxClick(objCheckBoxCell);
            }

            int.TryParse(dgvItemHistory["txtQuantity", e.RowIndex].Value.ToString(), out intTemp);
            if ((bool)objCheckBoxCell.Value)
            {
                SelectedTotal += intTemp;
            }
            else
            {
                SelectedTotal -= intTemp;
            }
            lblQtySelected.Text = SelectedTotal.ToString("#,#;( #,# );**Zero**");
        }