예제 #1
0
        private void lnkAddTestReport_Click(object sender, EventArgs e)
        {
            StabilityMonthlyPlanner sm = new StabilityMonthlyPlanner();

            if (gridStabilityPlanner.SelectedCells.Count > 0)
            {
                int             index = gridStabilityPlanner.SelectedCells[0].RowIndex;
                DataGridViewRow s     = gridStabilityPlanner.Rows[index];
                sm.StabilityCheckId  = Convert.ToInt32(s.Cells["StabilityCheckId"].Value.ToString());
                sm.ProductName       = s.Cells["ProductName"].Value.ToString();
                sm.BatchNo           = s.Cells["BatchNo"].Value.ToString();
                sm.MfgDate           = s.Cells["MfgDate"].Value.ToString();
                sm.ExpDate           = s.Cells["ExpDate"].Value.ToString();
                sm.BatchSize         = s.Cells["BatchSize"].Value.ToString();
                sm.Pack              = s.Cells["Pack"].Value.ToString();
                sm.ShelfLife         = s.Cells["ShelfLife"].Value.ToString();
                sm.ConditionInterval = s.Cells["ConditionInterval"].Value.ToString();
                sm.ItemCode          = s.Cells["Itemcode"].Value.ToString();
                sm.Country           = s.Cells["Country"].Value.ToString();
                sm.DueDate           = s.Cells["DueDate"].Value.ToString();
                sm.MONTH             = s.Cells["Month"].Value.ToString();
            }
            frmTestReport fr = new frmTestReport(sm);

            fr.ShowDialog();
        }
예제 #2
0
        private void gridTestReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            TestReport op = new TestReport();
            StabilityMonthlyPlanner sm = new StabilityMonthlyPlanner();

            if (gridStabilityPlanner.SelectedCells.Count > 0)
            {
                int             index = gridStabilityPlanner.SelectedCells[0].RowIndex;
                DataGridViewRow s     = gridStabilityPlanner.Rows[index];
                sm.StabilityCheckId  = Convert.ToInt32(s.Cells["StabilityCheckId"].Value.ToString());
                sm.ProductName       = s.Cells["ProductName"].Value.ToString();
                sm.BatchNo           = s.Cells["BatchNo"].Value.ToString();
                sm.MfgDate           = s.Cells["MfgDate"].Value.ToString();
                sm.ExpDate           = s.Cells["ExpDate"].Value.ToString();
                sm.BatchSize         = s.Cells["BatchSize"].Value.ToString();
                sm.Pack              = s.Cells["Pack"].Value.ToString();
                sm.ShelfLife         = s.Cells["ShelfLife"].Value.ToString();
                sm.ConditionInterval = s.Cells["ConditionInterval"].Value.ToString();
                sm.ItemCode          = s.Cells["Itemcode"].Value.ToString();
                sm.Country           = s.Cells["Country"].Value.ToString();
                sm.DueDate           = s.Cells["DueDate"].Value.ToString();
                sm.MONTH             = s.Cells["Month"].Value.ToString();
            }
            if (gridTestReport.SelectedCells.Count > 0)
            {
                int             index = gridTestReport.SelectedCells[0].RowIndex;
                DataGridViewRow s     = gridTestReport.Rows[index];
                op.Id = Convert.ToInt32(s.Cells["Id"].Value);
                op.StabilityCheckId = Convert.ToInt32(s.Cells["StabilityCheckId"].Value);
                op.TestId           = Convert.ToInt32(s.Cells["TestId"].Value);
                op.Initial          = s.Cells["Initial"].Value.ToString();
                op.M1  = s.Cells["M1"].Value.ToString();
                op.M2  = s.Cells["M2"].Value.ToString();
                op.M3  = s.Cells["M3"].Value.ToString();
                op.M6  = s.Cells["M6"].Value.ToString();
                op.M9  = s.Cells["M9"].Value.ToString();
                op.M12 = s.Cells["M12"].Value.ToString();
                op.M18 = s.Cells["M18"].Value.ToString();
                op.M24 = s.Cells["M24"].Value.ToString();
                op.M30 = s.Cells["M30"].Value.ToString();
                op.M36 = s.Cells["M36"].Value.ToString();
                op.M42 = s.Cells["M42"].Value.ToString();
                op.M48 = s.Cells["M48"].Value.ToString();
                op.M60 = s.Cells["M60"].Value.ToString();
                op.M72 = s.Cells["M72"].Value.ToString();
            }
            frmTestReport p = new frmTestReport(op, sm);

            p.ShowDialog();
        }