public int Update(clsttStandardDecide model, out string errMsg)
        {
            errMsg = string.Empty;
            int rtn = 0;

            try
            {
                strB.Length = 0;
                strB.Append("Insert Into ttStandDecide(FtypeNmae,SampleNum,Name,ItemDes,StandardValue,Demarcate,Unit)Values('");
                strB.Append(model.FtypeNmae);
                strB.Append("','");
                strB.Append(model.SampleNum);
                strB.Append("','");
                strB.Append(model.Name);
                strB.Append("','");
                strB.Append(model.ItemDes);
                strB.Append("','");
                strB.Append(model.StandardValue);
                strB.Append("','");
                strB.Append(model.Demarcate);
                strB.Append("','");
                strB.Append(model.Unit);
                strB.Append("')");
                DataBase.ExecuteCommand(strB.ToString(), out errMsg);
                strB.Length = 0;
                rtn         = 1;
            }
            catch (Exception e)
            {
                errMsg = e.Message;
            }
            return(rtn);
        }
        /// <summary>
        /// 插入||修改 样品和检测项目对应标准
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int InsertOrUpdate(clsttStandardDecide model, out string errMsg)
        {
            errMsg = string.Empty;
            int rtn = 0;

            try
            {
                strB.Length = 0;
                DataTable dataTable = new clsTaskOpr().GetSampleByNameOrCode(model.SampleNum, string.Empty, true, false, 2);
                //List<clsttStandardDecide> listModel = (List<clsttStandardDecide>)DataTableToIList<clsttStandardDecide>(dataTable, 1);
                //if (dataTable.Rows.Count > 0)
                //{
                //    strB.Append("Update ttStandDecide Set FtypeNmae = '" + model.FtypeNmae);
                //    strB.Append("',SampleNum = '" + model.SampleNum);
                //    strB.Append("',Name = '" + model.Name);
                //    strB.Append("',ItemDes = '" + model.ItemDes);
                //    strB.Append("',StandardValue = '" + model.StandardValue);
                //    strB.Append("',Demarcate = '" + model.Demarcate);
                //    strB.Append("',Unit = '" + model.Unit);
                //    strB.Append("',UDate = '" + model.UDate);
                //    strB.Append("' Where SampleNum = '" + model.SampleNum + "'");
                //}
                //else
                //{
                strB.Append("Insert Into ttStandDecide(FtypeNmae,SampleNum,Name,ItemDes,StandardValue,Demarcate,Unit,UDate)Values('");
                strB.Append(model.FtypeNmae);
                strB.Append("','");
                strB.Append(model.SampleNum);
                strB.Append("','");
                strB.Append(model.Name);
                strB.Append("','");
                strB.Append(model.ItemDes);
                strB.Append("','");
                strB.Append(model.StandardValue);
                strB.Append("','");
                strB.Append(model.Demarcate);
                strB.Append("','");
                strB.Append(model.Unit);
                strB.Append("','");
                strB.Append(model.UDate);
                strB.Append("')");
                //}
                DataBase.ExecuteCommand(strB.ToString(), out errMsg);
                strB.Length = 0;
                rtn         = 1;
            }
            catch (Exception e)
            {
                errMsg = e.Message;
            }
            return(rtn);
        }