예제 #1
0
        /// <summary>
        /// 删除订单
        /// </summary>
        /// <param name="id">订单的id值</param>
        private void Del(int id)
        {
            To_OrderInfo orderinfo = To_OrderInfoManager.getTo_OrderInfoById(id);

            if (orderinfo != null)
            {
                int     jobflowid = orderinfo.JobflowID;
                JobFlow model     = JobFlowManager.GetModel(jobflowid);

                if (model == null || model.auditstatus != "01")
                {
                    Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "del", "<script>alert('订单已删除或审核员已审核')</script>");
                }
                else if (!To_OrderInfoManager.CanDelete(id))
                {
                    Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "del", "<script>alert('该订单关联过收款或付款或退款或报销,无法删除')</script>");
                }
                else
                {
                    string strdel = " jobflowid=" + jobflowid;
                    AuditJobFlowManager.Delete(strdel);
                    JobFlowManager.Delete(jobflowid);
                    To_OrderInfoManager.deleteTo_OrderInfo(Convert.ToInt32(id));
                    To_OrderCollectDetialManager.deleteTo_OrderCollectDetialByOrderID(Convert.ToInt32(id));
                    To_OrderPayDetialManager.deleteTo_OrderPayDetialByOrderID(Convert.ToInt32(id));
                    To_OrderRefunDetialManager.deleteTo_OrderRefunDetialByOrderID(Convert.ToInt32(id));
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 删除付费申请
        /// </summary>
        /// <param name="paymentID"></param>
        /// <returns></returns>
        private string DeletePayment(string paymentID)
        {
            To_PaymentManager bPayment = new To_PaymentManager();
            //To_PaymentDetailManager bPaymentDetail = new To_PaymentDetailManager();

            string resultMsg = "删除成功";


            To_Payment mPayment = bPayment.GetModel(paymentID);


            if (!bPayment.Delete(paymentID))
            {
                resultMsg = "删除失败";
            }
            else
            {
                // bPaymentDetail.DeleteByPayment(paymentID);

                string delWhere = " jobflowid=" + mPayment.jobFlowID;
                AuditJobFlowManager.Delete(delWhere);
                JobFlowManager.Delete(mPayment.jobFlowID);
            }

            return(resultMsg);
        }
예제 #3
0
        /// <summary>
        /// 删除报销单
        /// </summary>
        /// <param name="id">报销单id</param>
        private void Del(int id)
        {
            AusRottenInfo info = AusRottenInfoManager.GetModel(id);

            if (info != null)
            {
                int    jobflowid = info.jobflowid;
                string strdel    = " jobflowid=" + jobflowid;
                AuditJobFlowManager.Delete(strdel);
                JobFlowManager.Delete(jobflowid);
                JobFlowFileManager.Delete(jobflowid);
                AusDetialInfoManager.Del(jobflowid);
                //RegReimbursementManager.Delete(id.ToString());
                //ReimbursementInvoiceManager;
                AusRottenInfoManager.Delete(id);
            }
        }
예제 #4
0
        /// <summary>
        /// 删除订单
        /// </summary>
        /// <param name="id">订单的id值</param>
        private void Del(int id)
        {
            To_OrderInfo orderinfo = To_OrderInfoManager.getTo_OrderInfoById(id);

            if (orderinfo != null)
            {
                int     jobflowid = orderinfo.JobflowID;
                JobFlow model     = JobFlowManager.GetModel(jobflowid);

                string strdel = " jobflowid=" + jobflowid;
                AuditJobFlowManager.Delete(strdel);
                JobFlowManager.Delete(jobflowid);
                To_OrderInfoManager.deleteTo_OrderInfo(Convert.ToInt32(id));
                To_OrderCollectDetialManager.deleteTo_OrderCollectDetialByOrderID(Convert.ToInt32(id));
                To_OrderPayDetialManager.deleteTo_OrderPayDetialByOrderID(Convert.ToInt32(id));
                To_OrderRefunDetialManager.deleteTo_OrderRefunDetialByOrderID(Convert.ToInt32(id));
            }
        }
예제 #5
0
        protected void ibtnDeleteAll_Click(object sender, ImageClickEventArgs e)
        {
            string delId = "";

            //先遍历取得选中项

            for (int i = 0; i < this.rpPoliy.Items.Count; i++)
            {
                CheckBox cbx = (CheckBox)(rpPoliy.Items[i].FindControl("cbx"));
                Label    lbl = (Label)rpPoliy.Items[i].FindControl("lbl");
                if (cbx != null || cbx.Text != "")
                {
                    if (cbx.Checked)
                    {
                        delId += lbl.Text + ",";
                    }
                }
            }
            //去掉最后一个,
            delId = (delId + ")").Replace(",)", "");
            IList check = delId.Split(',');


            for (int i = 0; i < check.Count; i++)
            {
                To_OrderInfo orderinfo = To_OrderInfoManager.getTo_OrderInfoById(Convert.ToInt32(check[i]));
                if (orderinfo != null)
                {
                    int     jobflowid = orderinfo.JobflowID;
                    JobFlow model     = JobFlowManager.GetModel(jobflowid);

                    string strdel = " jobflowid=" + jobflowid;
                    AuditJobFlowManager.Delete(strdel);
                    JobFlowManager.Delete(jobflowid);
                    To_OrderInfoManager.deleteTo_OrderInfo(Convert.ToInt32(check[i]));
                    To_OrderCollectDetialManager.deleteTo_OrderCollectDetialByOrderID(Convert.ToInt32(check[i]));
                    To_OrderPayDetialManager.deleteTo_OrderPayDetialByOrderID(Convert.ToInt32(check[i]));
                    To_OrderRefunDetialManager.deleteTo_OrderRefunDetialByOrderID(Convert.ToInt32(check[i]));
                }
            }

            BindData();
        }
예제 #6
0
        /// <summary>
        /// 删除保单
        /// </summary>
        /// <param name="id">保单的id值</param>
        private void Del(int id)
        {
            To_Policy policy = To_PolicyManager.getTo_PolicyById(id);

            if (policy != null)
            {
                int     jobflowid = policy.IsVerify;
                JobFlow model     = JobFlowManager.GetModel(jobflowid);
                if (model == null || model.auditstatus != "01")
                {
                    Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "del", "<script>alert('保单已删除或审核员已审核')</script>");
                }
                else
                {
                    string strdel = " jobflowid=" + jobflowid;
                    AuditJobFlowManager.Delete(strdel);
                    JobFlowManager.Delete(jobflowid);
                    To_PolicyManager.deleteTo_Policy(id);
                    To_PolicyDetailManager.DeleteByPolicy(id);
                }
            }
        }