コード例 #1
0
        /// <summary>
        /// Function to save data to BatchTable While Updating
        /// </summary>
        public void BatchTableEditFill()
        {

            try
            {
                BatchSP spBatch = new BatchSP();
                BatchInfo infoBatch = new BatchInfo();
                for (int inI = 0; inI < dgvProductCreation.RowCount - 1; inI++)
                {
                    infoBatch.BatchId = Convert.ToDecimal(dgvProductCreation.Rows[inI].Cells["dgvtxtbatchId"].Value);
                    infoBatch.ManufacturingDate = Convert.ToDateTime(dgvProductCreation.Rows[inI].Cells["dgvtxManfDate"].Value);
                    infoBatch.ExpiryDate = Convert.ToDateTime(dgvProductCreation.Rows[inI].Cells["dgvtxtExpDate"].Value);
                    infoBatch.BatchNo = dgvProductCreation.Rows[inI].Cells["dgvtxtbatch"].Value.ToString();
                    infoBatch.ProductId = decProductIdForEdit;
                    infoBatch.Extra1 = string.Empty;
                    infoBatch.Extra2 = string.Empty;
                    infoBatch.ExtraDate = DateTime.Now;
                    infoBatch.narration = string.Empty;
                    isBatchUpdated = spBatch.BatchEditForProductEdit(infoBatch);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("PC:19" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }