Пример #1
0
 /// <summary>
 /// 结算事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnAccount_Click(object sender, EventArgs e)
 {
     DataTable itable = BLL_PurDrug.GetListPurDrug(GetWhere(""));
     if (itable.Rows.Count == 0)
     {
         MessageBox.Show(this, "当前没有合乎结算条件的救助对象!");
         return;
     }
     MedSettle medSettle = new MedSettle
     {
         TypeId = 3,
         ApplyDeptId = manager.DeptId,
         ApplyName = manager.RealName,
         ApplyDate = DateTime.Now,
         State = 0,
         PurIdList = "",
         AccountMoney = 0.00m,
         ReplyDate = null
     };
     for (int count = 0; count < itable.Rows.Count; count++)
     {
         medSettle.PurIdList += (itable.Rows[count]["Id"] + ",");//结算信息编号间  "," 分割
         medSettle.AccountMoney += Convert.ToDecimal(itable.Rows[count]["ExpensTotalFee"].ToString());
     }
     if (BLL_MedSettle.AddMedSettle(medSettle) && AddSysLog(CommonEnum.ActionType.Add.ToString(), "批量购药结算"))
     {
         MessageBox.ShowAndRedirect(this, "批量结算成功", "DrugStoreManage.aspx");
     }
 }
Пример #2
0
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string[] para = DTRequest.GetQueryString("para").Split('|'); //获得参数,购药记录编号以及结算信息编号  "num1,num2,num3,|结算编号"

                this.rptList.DataSource = BLL_PurDrug.GetPurDrugByIdList(Array.ConvertAll(para[0].TrimEnd(',').Split(','), Convert.ToInt32)); //把购药参数变成整形数组
                this.rptList.DataBind();

                listDept = BLL_Department.GetDepartmentList("  TypeId=1 or TypeId=3 or TypeId=4 "); //获取,医院 患者类别 乡镇 的部门数据
                medSettle = BLL_MedSettle.GetMedSettleById(Convert.ToInt32(para[1]));
            }
        }
Пример #3
0
 /// <summary>
 ///     添加结算记录
 /// </summary>
 /// <param name="medSettle">结算信息实体</param>
 /// <returns>
 ///     添加成功: >0
 ///     失败    :  =0
 /// </returns> 
 public static bool AddMedSettle(MedSettle medSettle)
 {
     return DalMedSttle.AddMedSettle(medSettle, Array.ConvertAll(medSettle.PurIdList.TrimEnd(',').Split(','), Convert.ToInt32));   //把消费记录编号,分割后变成整形数组,作为参数
 }
Пример #4
0
 /// <summary>
 ///     更新结算信息信息
 /// </summary>
 /// <param name="medSettle"></param>
 /// <returns>
 ///     成功:true
 ///     失败:false
 /// </returns>
 public static bool UpdateMedSttle(MedSettle medSettle)
 {
     return DalMedSttle.UpdateMedSttle(medSettle);
 }