Exemplo n.º 1
0
        /// <summary>
        /// 得到到要调价的信息 返回列表 准备插入操作
        /// </summary>
        /// <returns></returns>
        private ArrayList GetInfo(string SequenceNo)
        {
            ArrayList ItemList = new ArrayList();

            if (AdjustTable == null)
            {
                return(null);
            }
            Neusoft.HISFC.Models.Fee.Item.AdjustPrice item = null;
            //循环取数据
            foreach (DataRow row in AdjustTable.Rows)
            {
                item = new Neusoft.HISFC.Models.Fee.Item.AdjustPrice();
                item.AdjustPriceNO        = SequenceNo;
                item.OrgItem.ID           = row["编码"].ToString();
                item.OrgItem.Price        = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["调前默认价"].ToString());
                item.OrgItem.ChildPrice   = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["调前儿童价"].ToString());
                item.OrgItem.SpecialPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["调前特诊价"].ToString());
                item.NewItem.Price        = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["调后默认价"].ToString());
                item.NewItem.ChildPrice   = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["调后儿童价"].ToString());
                item.NewItem.SpecialPrice = Neusoft.FrameWork.Function.NConvert.ToDecimal(row["调后特诊价"].ToString());
                item.BeginTime            = this.dtpImmediate.Value;
                if (this.ckbImmediate.Checked) //是否即时生效
                {
                    item.User03 = "已生效";       // 即时生效 则置成未生效
                }
                else
                {
                    item.User03 = "未生效"; //非即时生效 ,则置成已生效
                }
                ItemList.Add(item);
                item = null;
            }
            return(ItemList);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 增加一行数据到调价窗口
        /// </summary>
        private void AddDataInfo()
        {
            try
            {
                if (this.neuSpread1_Sheet1.RowCount < 1)
                {
                    return; //如果没有数据返回空
                }
                ArrayList alInfo = new ArrayList();
                Neusoft.HISFC.Models.Fee.Item.Undrug info = new Neusoft.HISFC.Models.Fee.Item.Undrug();
                //从数据库获取要修改的信息
                alInfo = item.Query(this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, GetColumnKey("编码")].Text, "all");
                if (info == null)
                {
                    MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("获取非药品信息出错"));
                    return;
                }
                if (alInfo == null)
                {
                    return;
                }
                info.ID           = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).ID;
                info.Name         = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).Name;
                info.Price        = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).Price;
                info.ChildPrice   = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).ChildPrice;
                info.SpecialPrice = ((Neusoft.HISFC.Models.Fee.Item.Undrug)alInfo[0]).SpecialPrice;

                //定义查找
                object[] keys    = new object[] { info.ID };
                DataRow  tempRow = AdjustTable.Rows.Find(keys);
                if (tempRow != null)
                {
                    MessageBox.Show(info.Name + "已经在调价信息表中了");
                    return;
                }

                Neusoft.HISFC.Models.Fee.Item.AdjustPrice tail = new Neusoft.HISFC.Models.Fee.Item.AdjustPrice();
                tail.OrgItem.ID           = info.ID;           //非药品编码
                tail.OrgItem.Name         = info.Name;         //非药品名称
                tail.OrgItem.Price        = info.Price;        //默认价
                tail.OrgItem.ChildPrice   = info.ChildPrice;   //儿童价
                tail.OrgItem.SpecialPrice = info.SpecialPrice; //特诊价
                tail.NewItem.Price        = info.Price;
                tail.NewItem.ChildPrice   = info.ChildPrice;
                tail.NewItem.SpecialPrice = info.SpecialPrice;
                //增加
                DataRow row = AdjustTable.NewRow();
                //填充数据
                SetAdjustRow(tail, row);
                //增加到表中
                AdjustTable.Rows.Add(row);
                //保存更改
                UndrugTable.AcceptChanges();
                LockfpSpread2();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 查询头表
        /// </summary>
        /// <param name="BeginTime"></param>
        /// <param name="EndTime"></param>
        /// <returns></returns>
        public ArrayList SelectPriceAdjustHead(System.DateTime BeginTime, System.DateTime EndTime)
        {
            ArrayList List   = null;
            string    strSql = "";

            if (this.Sql.GetSql("Fee.CAdjustPrice.SelectPriceAdjustHead", ref strSql) == -1)
            {
                return(null);
            }
            try
            {
                strSql = string.Format(strSql, BeginTime, EndTime);
                this.ExecQuery(strSql);
                Neusoft.HISFC.Models.Fee.Item.AdjustPrice info = null;
                List = new ArrayList();
                while (this.Reader.Read())
                {
                    info = new Neusoft.HISFC.Models.Fee.Item.AdjustPrice();
                    info.AdjustPriceNO = Reader[0].ToString();
                    if (Reader[1] != DBNull.Value)
                    {
                        info.Oper.OperTime = Convert.ToDateTime(Reader[1]);
                    }
                    List.Add(info);
                    info = null;
                }
                this.Reader.Close();
            }
            catch (Exception ee)
            {
                this.Err = ee.Message;
                List     = null;
            }
            return(List);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 非药品调价记录表 插入
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int InsertAdjustPriceDetail(Neusoft.HISFC.Models.Fee.Item.AdjustPrice info)
        {
            string strSql = "";

            if (this.Sql.GetSql("Fee.CAdjustPrice.InsertCAdjustPriceDetail", ref strSql) == -1)
            {
                return(-1);
            }
            try
            {
                string OperId     = this.Operator.ID;
                string ValueState = "";
                if (info.User03 == "已生效")
                {
                    ValueState = "0";
                }
                else if (info.User03 == "未生效")
                {
                    ValueState = "1";
                }
                else
                {
                    ValueState = "2";
                }
                strSql = string.Format(strSql, info.AdjustPriceNO, info.OrgItem.ID, info.NewItem.Price, info.NewItem.ChildPrice, info.NewItem.SpecialPrice, OperId, ValueState);
            }
            catch (Exception ee)
            {
                this.Err = ee.Message;
            }
            return(this.ExecNoQuery(strSql));
        }
Exemplo n.º 5
0
 /// <summary>
 /// 填充 调价信息
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="row"></param>
 private void SetAdjustRow(Neusoft.HISFC.Models.Fee.Item.AdjustPrice obj, DataRow row)
 {
     row["编码"]    = obj.OrgItem.ID;              //0
     row["名称"]    = obj.OrgItem.Name;            //1
     row["调前默认价"] = obj.OrgItem.Price;           //5
     row["调前儿童价"] = obj.OrgItem.ChildPrice;      //6
     row["调前特诊价"] = obj.OrgItem.SpecialPrice;    //7
     row["调后默认价"] = obj.NewItem.Price;           //5
     row["调后儿童价"] = obj.NewItem.ChildPrice;      //6
     row["调后特诊价"] = obj.NewItem.SpecialPrice;    //7
 }
Exemplo n.º 6
0
        /// <summary>
        /// 非药品调价头表  插入
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>

        public int  InsertAdjustPrice(Neusoft.HISFC.Models.Fee.Item.AdjustPrice info)
        {
            string strSql = "";

            if (info.IsValid)
            {
                //调价即时生效
                if (this.Sql.GetSql("Fee.CAdjustPrice.InsertCAdjustPrice1", ref strSql) == -1)
                {
                    return(-1);
                }
                try
                {
                    string OperId = this.Operator.ID;
                    //insert into fin_com_adjustundrugpricehead values('[父级编码]','[本级编码]','{0}',sysdate,'{1}',sysdate)
                    strSql = string.Format(strSql, info.AdjustPriceNO, OperId);
                }
                catch (Exception ee)
                {
                    this.Err = ee.Message;
                }
            }
            else
            {
                if (this.Sql.GetSql("Fee.CAdjustPrice.InsertCAdjustPrice2", ref strSql) == -1)
                {
                    return(-1);
                }
                try
                {
                    string OperId = this.Operator.ID;
                    //insert into fin_com_adjustundrugpricehead values('[父级编码]','[本级编码]','{0}',{1},'{2}',sysdate)
                    strSql = string.Format(strSql, info.AdjustPriceNO, info.Oper.OperTime, OperId);
                }
                catch (Exception ee)
                {
                    this.Err = ee.Message;
                }
            }
            return(this.ExecNoQuery(strSql));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 查询明细
        /// </summary>
        /// <param name="AdjustPriceNo"></param>
        /// <returns></returns>
        public ArrayList SelectPriceAdjustTail(string AdjustPriceNo)
        {
            ArrayList List   = null;
            string    strSql = "";

            if (this.Sql.GetSql("Fee.CAdjustPrice.SelectPriceAdjustTail", ref strSql) == -1)
            {
                return(null);
            }
            try
            {
                strSql = string.Format(strSql, AdjustPriceNo);
                this.ExecQuery(strSql);
                Neusoft.HISFC.Models.Fee.Item.AdjustPrice info = null;
                List = new ArrayList();
                while (this.Reader.Read())
                {
                    info = new Neusoft.HISFC.Models.Fee.Item.AdjustPrice();
                    info.AdjustPriceNO = Reader[0].ToString();
                    info.OrgItem.ID    = Reader[1].ToString();
                    info.OrgItem.Name  = Reader[2].ToString();
                    if (Reader[3] != DBNull.Value)
                    {
                        info.OrgItem.Price = Convert.ToDecimal(Reader[3]);
                    }
                    if (Reader[4] != DBNull.Value)
                    {
                        info.NewItem.Price = Convert.ToDecimal(Reader[4]);
                    }
                    if (Reader[5] != DBNull.Value)
                    {
                        info.OrgItem.ChildPrice = Convert.ToDecimal(Reader[5]);
                    }
                    if (Reader[6] != DBNull.Value)
                    {
                        info.NewItem.ChildPrice = Convert.ToDecimal(Reader[6]);
                    }
                    if (Reader[7] != DBNull.Value)
                    {
                        info.OrgItem.SpecialPrice = Convert.ToDecimal(Reader[7]);
                    }
                    if (Reader[8] != DBNull.Value)
                    {
                        info.NewItem.SpecialPrice = Convert.ToDecimal(Reader[8]);
                    }
                    info.Oper.ID = Reader[9].ToString();
                    if (Reader[10] != DBNull.Value)
                    {
                        info.Oper.OperTime = Convert.ToDateTime(Reader[10]);
                    }
                    string ValueState = Reader[11].ToString();
                    if (ValueState == "0")
                    {
                        info.User03 = "已生效";                        //
                    }
                    else if (ValueState == "1")
                    {
                        info.User03 = "未生效";                        //
                    }
                    else
                    {
                        info.User03 = "已作废";
                    }

                    List.Add(info);
                    info = null;
                }
                this.Reader.Close();
            }
            catch (Exception ee)
            {
                this.Err = ee.Message;
                List     = null;
            }
            return(List);
        }