/// <summary>
        /// 赋值
        /// </summary>
        /// <param name="PresType">0长期,1临时</param>
        /// <param name="rowid">行号</param>
        /// <param name="dr">列</param>
        /// <returns>列号</returns>
        public int SelectCardBindData(int PresType, int rowid, DataRow dr)
        {
            DataTable dt = null;

            if (PresType == 0)
            {
                dt = view.BindLongPresControlData;
            }
            else
            {
                dt = view.BindShortPresControlData;
            }
            string presType = XcConvert.IsNull(dr["PresType"], "-1").Trim();

            //模板
            if (presType == "6")
            {
                int       feeType = Convert.ToInt32(dr["ITEMTYPE"]);//0 药品模板 ;1项目模板
                DataTable tempDt  = zyPresOrder.GetPresTemplateData(Convert.ToInt32(dr["ITEMID"]));
                //循环模板
                for (int i = 0; i < tempDt.Rows.Count; i++)
                {
                    dr["ITEMID"] = tempDt.Rows[i]["ITEM_ID"];
                    presType     = Convert.ToInt32(tempDt.Rows[i]["COMPLEX_ID"]) == 0 ? "4" : "5";
                    for (int k = 0; k < _dataSet.Tables["ITEM_DICTIONARY"].Rows.Count; k++)
                    {
                        //ITEMID && feeType == 0   PresType(1,2,3)
                        //ITEMID && feeType == 0   PresType(4,5)
                        if (_dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["ITEMID"].ToString().Trim() == tempDt.Rows[i]["ITEM_ID"].ToString().Trim() &&
                            ((feeType == 0 && (_dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["PresType"].ToString().Trim() == "1" ||
                                               _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["PresType"].ToString().Trim() == "2" ||
                                               _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["PresType"].ToString().Trim() == "3")) ||
                             (feeType == 1 &&
                              _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["PresType"].ToString().Trim() == presType)))
                        {
                            dr["ITEMTYPE"]     = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["ITEMTYPE"];
                            dr["ITEMNAME"]     = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["ITEMNAME"];
                            dr["STANDARD"]     = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["STANDARD"];
                            dr["SELL_PRICE"]   = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["SELL_PRICE"];
                            dr["PACKUNIT"]     = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["PACKUNIT"];
                            dr["UNIT"]         = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["UNIT"];
                            dr["EXECDEPTCODE"] = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["EXECDEPTCODE"];
                            dr["EXECDEPTNAME"] = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["EXECDEPTNAME"];
                            dr["PresType"]     = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["PresType"];
                            dr["Buy_Price"]    = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["Buy_Price"];
                            dr["RELATIONNUM"]  = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["RELATIONNUM"];
                            dr["scale"]        = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["scale"];
                            dr["STORENUM"]     = _dataSet.Tables["ITEM_DICTIONARY"].Rows[k]["STORENUM"];
                            break;
                        }
                    }
                    this.SelectCardEqualsData(dt, rowid, dr, Convert.ToDecimal(tempDt.Rows[i]["AMOUNT"]));
                    rowid = this.AddRow(PresType);
                }
            }//其他费用项目
            else
            {
                if (Convert.ToInt32(dr["STORENUM"]) > 0)
                {
                    this.SelectCardEqualsData(dt, rowid, dr, 0);
                }
                else
                {
                    throw new Exception("该药品[" + dr["ITEMNAME"].ToString() + "]无库存!");
                }
            }
            ZY_PresOrder zyPS = new ZY_PresOrder();

            zyPS = (ZY_PresOrder)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(dt, rowid, zyPS);
            ShowRowColor(zyPS, rowid, -1);
            return(rowid);
        }