Esempio n. 1
0
        private void DataInit(string jobID)
        {
            DataAccess.RunProcedure run = new DataAccess.RunProcedure();
            string dbName = run.GetListDbName(jobID);

            viewDt = run.JobView(jobID, dbName);
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string jobID = ZWL.ObjectOperation.QueryStringHelper.GetQuery("JobID");
         if (jobID == null)
         {
             Response.Redirect("/Manager/JobList.aspx", false);
         }
         else
         {
             DataAccess.RunProcedure run = new DataAccess.RunProcedure();
             DataSet ds     = null;
             string  dbName = run.GetListDbName(jobID);
             if (string.IsNullOrEmpty(dbName))
             {
                 Alert("获取数据失败!");
             }
             else
             {
                 ds = run.JobView(jobID, dbName);
             }
             //根据实际情况调用
             LoadPage(ds.Tables[0]);
         }
     }
 }
Esempio n. 3
0
        private DataSet DataInit(string jobID)
        {
            DataAccess.RunProcedure run = new DataAccess.RunProcedure();
            string dbName = run.GetListDbName(jobID);

            if (string.IsNullOrEmpty(dbName))
            {
                Alert("获取数据失败!");
                return(null);
            }
            else
            {
                return(run.JobView(jobID, dbName));
            }
        }
Esempio n. 4
0
        private void DataInit(string jobID)
        {
            DataAccess.RunProcedure run = new DataAccess.RunProcedure();
            string dbName = run.GetListDbName(jobID);

            if (string.IsNullOrEmpty(dbName))
            {
                Alert("获取数据失败!");
            }
            else
            {
                viewDt = run.JobView(jobID, dbName);
                if (viewDt.Tables[0].Rows[0]["JobType"].ToString() == "SL")
                {
                    repeater.DataSource = run.SaleJobListView(jobID).Tables[0];
                    repeater.DataBind();
                }
            }
        }
Esempio n. 5
0
 /// <summary>
 /// 调用支付下单接口
 /// </summary>
 /// <param name="jobID"></param>
 /// <returns></returns>
 public static string IPay(string jobID)
 {
     try
     {
         DataSet viewDt;
         DataAccess.RunProcedure run = new DataAccess.RunProcedure();
         string dbName = run.GetListDbName(jobID);
         if (string.IsNullOrEmpty(dbName))
         {
             throw new Exception("获取数据失败!");
         }
         else
         {
             viewDt = run.JobView(jobID, dbName);
         }
         Dictionary <string, string> dic = new Dictionary <string, string>();
         //正式环境
         dic.Add("OrderId", jobID);
         dic.Add("Amount", (int.Parse(viewDt.Tables[0].Rows[0]["Fee"].ToString()) * 100).ToString());
         //测试环境
         //dic.Add("OrderId", jobID);
         //dic.Add("Amount", "1");
         dic.Add("Description", string.Format("数据分中心-{0}-制卡收费", viewDt.Tables[0].Rows[0]["JobName"].ToString()));
         dic.Add("ApplicantName", viewDt.Tables[0].Rows[0]["EnterpriseName"].ToString());
         dic.Add("AppId", ZWL.GeneralHelper.GetSettingByKey("AppId"));
         dic.Add("CallbackUrl", ZWL.GeneralHelper.GetSettingByKey("CallbackUrl"));
         dic.Add("NotifyUrl", ZWL.GeneralHelper.GetSettingByKey("NotifyUrl"));
         dic.Add("Account", "haicheng");
         dic.Add("Note", "");
         dic.Add("NonceStr", Guid.NewGuid().ToString().Replace("-", ""));
         return(ZWL.GeneralHelper.GetSettingByKey("Pay") + Signature(dic));
     }
     catch (Exception ex)
     {
         DataAccess.TranHelper.BeginTran();
         new Sys_Log().AddLog(string.Format("Function:CardPrintHelper.IPay;Param:{0};ErrorMsg:{1}", jobID, ex.ToString()));
         DataAccess.TranHelper.CommitTran();
         return(null);
     }
 }
Esempio n. 6
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string jobID = context.Request.Form["jobID"];

            DataAccess.RunProcedure run = new DataAccess.RunProcedure();
            string dbName = run.GetListDbName(jobID);

            if (string.IsNullOrEmpty(dbName))
            {
                context.Response.Write("获取子表数据失败!");
            }
            else
            {
                if (run.JobDelete(jobID, dbName))
                {
                    context.Response.Write("");
                }
                else
                {
                    context.Response.Write("删除失败!");
                }
            }
        }
Esempio n. 7
0
        private void DataInit(string jobID)
        {
            DataAccess.RunProcedure run = new DataAccess.RunProcedure();
            string dbName = run.GetListDbName(jobID);

            if (string.IsNullOrEmpty(dbName))
            {
                Alert("获取数据失败!");
            }
            else
            {
                viewDt = run.JobView(jobID, dbName);
                repeater1.DataSource = run.GetHandleListByJobID(jobID).Tables[0];
                repeater1.DataBind();
                if (viewDt.Tables[0].Rows[0]["JobType"].ToString().Equals("SL"))
                {
                    if (type.Equals("view"))
                    {
                        thCheck.Visible     = false;
                        repeater.DataSource = run.SaleJobListView(jobID).Tables[0];
                        repeater.DataBind();
                    }
                    else
                    {
                        statusRepeater.DataSource = viewDt.Tables[1];
                        statusRepeater.DataBind();
                        repeater.DataSource = run.SaleJobList(viewDt.Tables[0].Rows[0]["CreateUser"].ToString()).Tables[0];
                        repeater.DataBind();
                    }
                    showStatusRepeater.DataSource = viewDt.Tables[1];
                    showStatusRepeater.DataBind();
                }
            }
            InitInvoiceMsg(viewDt.Tables[0]);
            InitFRMsg(viewDt.Tables[1]);
        }
 public void ProcessRequest(HttpContext context)
 {
     try
     {
         context.Response.ContentType = "text/plain";
         string jobID                = context.Request.Form["jobID"];
         string jobType              = context.Request.Form["jobType"];
         string selectFlow           = context.Request.Form["selectFlow"];
         string content              = context.Request.Form["content"];
         DataAccess.RunProcedure run = new DataAccess.RunProcedure();
         string dbName               = run.GetListDbName(jobID);
         //生成受理回执
         #region 2016.4.21业务修改为提交工单后可下载回执,本段代码取消
         //if(selectFlow == "5")
         //{
         //    FileInfo file = new FileInfo(context.Server.MapPath("../ApprovalDemo/业务受理审批回执.jpg"));
         //    string fileName =  Guid.NewGuid().ToString() + ".jpg";
         //    file.CopyTo(ZWL.GeneralHelper.GetSettingByKey("CardPrintingApprovalPath") + fileName, true);
         //    CardPrinting.Entity.JobInfo job = new CardPrinting.DataAccess.JobInfo().GetModel(jobID);
         //    job.ApprovalFile = fileName;
         //    if (!new CardPrinting.DataAccess.JobInfo().Update(job))
         //    {
         //        context.Response.Write("生成业务受理审批回执失败!");
         //        return;
         //    }
         //}
         #endregion
         if (new DataAccess.StatusType().GetModel(int.Parse(selectFlow)).StatusName.Contains("已办结"))
         {
             if (!run.CanFinish(jobID, dbName))
             {
                 context.Response.Write("请先完成工单项处理,再标记工单流程为【已办结】!");
                 return;
             }
         }
         Entity.FlowInfo entity = new Entity.FlowInfo();
         entity.Guid       = Guid.NewGuid().ToString();
         entity.JobID      = jobID;
         entity.FlowID     = int.Parse(selectFlow);
         entity.SubmitDate = DateTime.Now;
         entity.SubmitUser = PageBase.CommonObject.ManagerUserInfo.guid;
         entity.Content    = content;
         entity.IsDelete   = false;
         entity.Remark     = "";
         DataAccess.TranHelper.BeginTran();
         new DataAccess.FlowInfo().Add(entity);
         try
         {
             DataAccess.TranHelper.CommitTran();
             context.Response.Write("提交成功");
         }
         catch (Exception ex)
         {
             context.Response.Write("提交失败" + ex.Message);
         }
     }
     catch (Exception ex)
     {
         context.Response.Write(ex.Message);
     }
 }