Exemplo n.º 1
0
        //获得目标配合比多条明细表的信息
        private List <MaterialTestGuidelineClass> GetTPDetail()
        {
            MaterialTestGuidelineClass        MTGClass = null;
            List <MaterialTestGuidelineClass> list     = new List <MaterialTestGuidelineClass>();

            try
            {
                foreach (DataGridViewRow dgvr in dgvDetail.Rows)
                {
                    MTGClass = new MaterialTestGuidelineClass();

                    MTGClass.MId           = int.Parse(dgvr.Cells["mId"].Value.ToString());
                    MTGClass.Guideline     = dgvr.Cells["guideline"].Value.ToString();
                    MTGClass.TestGuideline = dgvr.Cells["testGuideline"].Value.ToString();
                    MTGClass.Frequency     = dgvr.Cells["frequency"].Value.ToString();
                    MTGClass.Remark        = dgvr.Cells["remark"].Value.ToString();
                    MTGClass.InputDate     = Convert.ToDateTime(dgvr.Cells["inputDate"].Value.ToString());
                    MTGClass.InputMan      = dgvr.Cells["inputMan"].Value.ToString();

                    list.Add(MTGClass);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
            }
            return(list);
        }
Exemplo n.º 2
0
        /*
         * 方法名称:FrmInspectingfrequencyAddNew
         * 方法功能描述:给新建目标配合比明细表的datagridview添加行
         *
         * 创建人:夏阳明
         * 创建时间:20090307
         *
         * 修改人:
         * 修改时间:
         * 修改内容:
         *
         */

        public void FrmInspectingfrequencyAddNew(MaterialTestGuidelineClass MTGClass, DataTable dt, string Kinds,
                                                 string Name, string Model)
        {
            DataRow dr = dt.NewRow();

            dr["id"]                   = MTGClass.Id;
            dr["sort"]                 = Kinds;
            dr["name"]                 = Name;
            dr["model"]                = Model;
            dr["testGuideline"]        = MTGClass.TestGuideline;
            dr["frequency"]            = MTGClass.Frequency;
            dr["eligibilityGuideline"] = MTGClass.Guideline;
            dr["inputDate"]            = MTGClass.InputDate;
            dr["inputMan"]             = MTGClass.InputMan;
            dr["remark"]               = MTGClass.Remark;
            dr["mId"]                  = MTGClass.MId;

            dt.Rows.Add(dr);
        }
Exemplo n.º 3
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            MaterialTestGuidelineClass MTGDC = new MaterialTestGuidelineClass();

            MTGDC.Id            = int.Parse(dgvDetail.SelectedRows[0].Cells["id"].Value.ToString());
            MTGDC.Sort          = dgvDetail.SelectedRows[0].Cells[1].Value.ToString();
            MTGDC.Name          = dgvDetail.SelectedRows[0].Cells[2].Value.ToString();
            MTGDC.Model         = dgvDetail.SelectedRows[0].Cells[3].Value.ToString();
            MTGDC.TestGuideline = dgvDetail.SelectedRows[0].Cells[4].Value.ToString();
            MTGDC.Frequency     = dgvDetail.SelectedRows[0].Cells[5].Value.ToString();
            MTGDC.Guideline     = dgvDetail.SelectedRows[0].Cells[6].Value.ToString();
            MTGDC.Remark        = dgvDetail.SelectedRows[0].Cells[9].Value.ToString();

            if (rbttype1.Checked)
            {
                MTGDC.VerityBit = 0; // 材料
            }
            else
            {
                MTGDC.VerityBit = 1; // 产品
            }

            IFU.MTGDC1 = MTGDC;

            if (IFU.ShowDialog() == DialogResult.OK)
            {
                //dgvDetail.DataSource = (qualityLogic.SearchAll("", 0)).Tables[0];
                if (rbttype1.Checked)
                {
                    dgvDetail.DataSource = (qualityLogic.SearchAll("", 0, 0)).Tables[0];
                }
                else
                {
                    dgvDetail.DataSource = (qualityLogic.SearchAll("", 0, 1)).Tables[0];
                }
                dgvDetail.Rows[0].Selected = false;
            }
        }
Exemplo n.º 4
0
        /*
         * 方法名称:FrmInspectingfrequencyUpdateSave
         * 方法功能描述:更新
         *
         * 创建人:夏阳明
         * 创建时间:20090414
         *
         * 修改人:
         * 修改时间:
         * 修改内容:
         *
         */

        public bool FrmInspectingfrequencyUpdateSave(MaterialTestGuidelineClass MTGDC)
        {
            return(qualityDb.FrmInspectingfrequencyUpdateSave(MTGDC));
        }