Пример #1
0
        /// <summary>
        /// 得到所有记账费用
        /// </summary>
        /// <returns></returns>
        public decimal GetAllChargeFee(DateTime Bdate, DateTime Edate, List <ZY_Account> zylist)
        {
            IaccountDao itD = DaoFactory.GetObject <IaccountDao>(typeof(AccountDao));

            itD.oleDb = oleDb;
            return(itD.GetAllChargeFee(Bdate, Edate, zylist));
        }
Пример #2
0
        /// <summary>
        /// 得到项目数据
        /// </summary>
        /// <param name="AccountID">结算ID</param>
        /// <returns></returns>
        public DataTable GetBIGItemData(string[] AccountID)
        {
            IaccountDao itD = DaoFactory.GetObject <IaccountDao>(typeof(AccountDao));

            itD.oleDb = oleDb;
            return(itD.GetBIGItemData(AccountID));
        }
Пример #3
0
        /// <summary>
        /// 得到记账费用
        /// </summary>
        /// <param name="AccountID">记账ID</param>
        /// <returns></returns>
        public DataTable GetVillage_Fee(int AccountID)
        {
            IaccountDao itD = DaoFactory.GetObject <IaccountDao>(typeof(AccountDao));

            itD.oleDb = oleDb;
            return(itD.GetVillage_Fee(AccountID));
        }
Пример #4
0
 /// <summary>
 /// 得到所有未交款的结算
 /// </summary>
 /// <param name="ChargeCode">操作员代码</param>
 /// <returns></returns>
 public DataTable GetAllCost(string ChargeCode)
 {
     try
     {
         IaccountDao itD = DaoFactory.GetObject <IaccountDao>(typeof(AccountDao));
         itD.oleDb = oleDb;
         DataTable dt = itD.GetAllCost(ChargeCode);
         return(dt);
     }
     catch (System.Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Пример #5
0
        /// <summary>
        /// 获取科室分类数据
        /// </summary>
        /// <param name="AccountID">交款ID</param>
        /// <returns></returns>
        public DataTable GetAccountDeptOrderData(int AccountID)
        {
            DataTable dt = new DataTable();

            string    strWhere = "Accountid=" + AccountID;
            DataTable DeptDT   = BindEntity <ZY_CostMaster> .CreateInstanceDAL(oleDb).GetList(strWhere, "CostMasterID", "PatlistID");


            //建列
            DataColumn column;
            ArrayList  al = new ArrayList();

            for (int i = 0; i < DeptDT.Rows.Count; i++)
            {
                string deptcode = BindEntity <ZY_PatList> .CreateInstanceDAL(oleDb).GetFieldValue("curedeptcode", "patlistid=" + DeptDT.Rows[i]["patlistid"] + "").ToString();

                if (!al.Contains(deptcode))
                {
                    al.Add(deptcode);
                }
            }
            column            = new DataColumn();
            column.DataType   = System.Type.GetType("System.String");
            column.ColumnName = "费用项目";
            //column.ReadOnly = true;
            dt.Columns.Add(column);
            for (int i = 0; i < al.Count; i++)
            {
                string deptName = BaseNameFactory.GetName(baseNameType.科室名称, al[i].ToString());//HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.GetDeptName(al[i].ToString());
                column            = new DataColumn();
                column.DataType   = System.Type.GetType("System.Decimal");
                column.ColumnName = deptName;
                //column.ReadOnly = true;
                dt.Columns.Add(column);
            }

            column            = new DataColumn();
            column.DataType   = System.Type.GetType("System.Decimal");
            column.ColumnName = "合计";
            //column.ReadOnly = true;
            dt.Columns.Add(column);



            //添加行

            IaccountDao itD = DaoFactory.GetObject <IaccountDao>(typeof(AccountDao));

            itD.oleDb = oleDb;
            DataTable ItemDT = itD.GetAccountDeptOrderData(AccountID);

            ArrayList alrow = new ArrayList();
            DataRow   row   = null;

            for (int i = 0; i < ItemDT.Rows.Count; i++)
            {
                if (!alrow.Contains(ItemDT.Rows[i]["itemname"]))
                {
                    alrow.Add(ItemDT.Rows[i]["itemname"]);
                    row = dt.NewRow();
                    int rowid = alrow.Count - 1;
                    row["费用项目"] = ItemDT.Rows[i]["itemname"].ToString();
                    row[ItemDT.Rows[i]["deptname"].ToString()] = Convert.ToDecimal(ItemDT.Rows[i]["total_fee"]);
                    row["合计"] = Convert.ToDecimal(ItemDT.Rows[i]["total_fee"]);
                    dt.Rows.Add(row);
                }
                else
                {
#if DEBUG
                    if (i == 28)
                    {
                        break;
                    }
#endif
                    int rowid = alrow.IndexOf(ItemDT.Rows[i]["itemname"]);
                    dt.Rows[rowid][ItemDT.Rows[i]["deptname"].ToString()] = Convert.ToDecimal(dt.Rows[rowid][ItemDT.Rows[i]["deptname"].ToString()].ToString() == "" ? "0" : dt.Rows[rowid][ItemDT.Rows[i]["deptname"].ToString()].ToString()) + Convert.ToDecimal(ItemDT.Rows[i]["total_fee"]);
                    dt.Rows[rowid]["合计"] = Convert.ToDecimal(dt.Rows[rowid]["合计"]) + Convert.ToDecimal(ItemDT.Rows[i]["total_fee"]);
                }
            }

            CreateDataTableRowAll(dt);

            return(dt);
        }