Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #3
0
 public frmTestReport(StabilityMonthlyPlanner o)
 {
     oB = new BAL();
     InitializeComponent();
     BindDD();
     StabilityCheckId          = o.StabilityCheckId;
     lblProductName.Text       = o.ProductName;
     lblBatchNo.Text           = o.BatchNo;
     lblMfgDate.Text           = o.MfgDate;
     lblExpDate.Text           = o.ExpDate;
     lblBatchSize.Text         = o.BatchSize;
     lblPack.Text              = o.Pack;
     lblShelfLife.Text         = o.ShelfLife;
     lblConditionInterval.Text = o.ConditionInterval;
     lblItemCode.Text          = o.ItemCode;
     lblCountry.Text           = o.Country;
     lblDueDate.Text           = o.DueDate + "-" + o.MONTH;
 }
Beispiel #4
0
        public frmTestReport(TestReport o, StabilityMonthlyPlanner o1)
        {
            oB = new BAL();
            InitializeComponent();
            BindDD();
            ClealAll();
            Id = o.Id;
            txtInitial.Text       = o.Initial;
            StabilityCheckId      = o.StabilityCheckId;
            ddlTest.SelectedValue = o.TestId;
            txtInitial.Text       = o.Initial;
            txt1M.Text            = o.M1;
            txt2M.Text            = o.M2;
            txt3M.Text            = o.M3;
            txt6M.Text            = o.M6;
            txt9M.Text            = o.M9;
            txt12M.Text           = o.M12;
            txt18M.Text           = o.M18;
            txt24M.Text           = o.M24;
            txt30M.Text           = o.M30;
            txt36M.Text           = o.M36;
            txt42M.Text           = o.M42;
            txt48M.Text           = o.M48;
            txt60M.Text           = o.M60;
            txt72M.Text           = o.M72;

            lblProductName.Text       = o1.ProductName;
            lblBatchNo.Text           = o1.BatchNo;
            lblMfgDate.Text           = o1.MfgDate;
            lblExpDate.Text           = o1.ExpDate;
            lblBatchSize.Text         = o1.BatchSize;
            lblPack.Text              = o1.Pack;
            lblShelfLife.Text         = o1.ShelfLife;
            lblConditionInterval.Text = o1.ConditionInterval;
            lblItemCode.Text          = o1.ItemCode;
            lblCountry.Text           = o1.Country;
            lblDueDate.Text           = o1.DueDate + "-" + o1.MONTH;
        }