Example #1
0
        //获得目标配合比多条明细表的信息
        private List <TargetProportionDetailClass> GetTPDetail()
        {
            TargetProportionDetailClass        TPDetailClass = null;
            List <TargetProportionDetailClass> list          = new List <TargetProportionDetailClass>();

            try
            {
                foreach (DataGridViewRow dgvr in dgvDetail.Rows)
                {
                    TPDetailClass = new TargetProportionDetailClass();

                    //TPDetailClass.Id = int.Parse(dgvr.Cells["id"].Value.ToString());
                    TPDetailClass.MnmcId = int.Parse(dgvr.Cells["mId"].Value.ToString());
                    TPDetailClass.TargetProportionValue = Convert.ToDouble(dgvr.Cells["targetProportionValue"].Value.ToString());
                    TPDetailClass.Producer  = dgvr.Cells["producer"].Value.ToString();
                    TPDetailClass.InputDate = Convert.ToDateTime(dgvr.Cells["inputDate"].Value.ToString());
                    TPDetailClass.InputMan  = dgvr.Cells["inputMan"].Value.ToString();
                    TPDetailClass.Address   = dgvr.Cells["address"].Value.ToString();
                    TPDetailClass.Name      = dgvr.Cells["name1"].Value.ToString();
                    TPDetailClass.PId       = int.Parse(dgvr.Cells["Pid"].Value.ToString());

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

        public void FrmMixtureRatioAddNew(TargetProportionDetailClass TPDObj, DataTable dt, string Kinds,
                                          string Name, string Model)
        {
            DataRow dr = dt.NewRow();

            dr["id"]    = TPDObj.Id;
            dr["sort"]  = Kinds;
            dr["name"]  = Name;
            dr["model"] = Model;
            dr["targetProportionValue"] = TPDObj.TargetProportionValue;
            dr["inputDate"]             = TPDObj.InputDate;
            dr["inputMan"] = TPDObj.InputMan;
            dr["producer"] = TPDObj.Producer;
            dr["mId"]      = TPDObj.MnmcId;
            dr["address"]  = TPDObj.Address;
            dr["name1"]    = TPDObj.Name;
            dr["Pid"]      = TPDObj.PId;

            dt.Rows.Add(dr);
        }
Example #3
0
        /*
         * 方法名称:FrmMixtureRatioAddNewTargetProportionDetail
         * 方法功能描述:将目标配合比详细信息插入数据库
         *
         * 创建人:夏阳明
         * 创建时间:20090303
         *
         * 修改人:
         * 修改时间:
         * 修改内容:
         *
         */
        public bool FrmMixtureRatioAddNewTargetProportionDetail(TargetProportionDetailClass TPDetailClass, string userName)
        {
            status = qualityDb.FrmMixtureRatioAddNewTargetProportionDetail(TPDetailClass, userName);

            return(status);
        }