Exemplo n.º 1
0
 protected void lnbRemoveImage_Click(object sender, EventArgs e)
 {
     MojoCube.Web.Payment.List list = new MojoCube.Web.Payment.List();
     list.GetData(int.Parse(ViewState["pk_Payment"].ToString()));
     list.ImagePath = string.Empty;
     list.UpdateData(list.pk_Payment);
     imgMain.Attributes.Add("style", "display:none");
     lnbRemoveImage.Visible = false;
 }
Exemplo n.º 2
0
    private string CreateHistory(MojoCube.Web.Order.List list)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<br/>");
        sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.CreateDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 创建订单,订单编号【" + list.OrderNumber + "】<br/>");

        if (list.fk_Payment > 0)
        {
            MojoCube.Web.Payment.List payment = new MojoCube.Web.Payment.List();
            payment.GetData(list.fk_Payment);
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.PaymentDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 付款成功,【" + payment.Title + "】<br/>");
        }

        if (list.ShipperCode != "")
        {
            MojoCube.Web.Sys.Express express = new MojoCube.Web.Sys.Express();
            express.GetData(list.ShipperCode);
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.ShipmentDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 已发货," + express.FullName + ",运单号【" + list.LogisticCode + "】<br/>");

            DataTable dt = new DataTable();
            if (Session["LogisticCode_" + list.LogisticCode] != null)
            {
                dt = (DataTable)Session["LogisticCode_" + list.LogisticCode];
            }
            else
            {
                dt = MojoCube.Web.Express.Function.GetLogisticDT(list.ShipperCode, list.LogisticCode);
                Session["LogisticCode_" + list.LogisticCode] = dt;
            }
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(dt.Rows[i]["Time"].ToString()).ToString("yyyy-MM-dd HH:mm") + "]</span> " + dt.Rows[i]["Content"].ToString() + "<br/>");
                }
            }
        }

        if (list.StatusID == 3)
        {
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.EndDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 交易成功<br/>");
        }

        if (list.StatusID == 4)
        {
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.CancelDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 交易关闭<br/>");
        }

        return(sb.ToString());
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            hlBack.NavigateUrl = "List.aspx?active=" + Request.QueryString["active"];

            MojoCube.Web.Sql.DropDownListBind(ddlType, "Sys_TypeID", "TypeName_CHS", "ID", "TableName='Payment_List'", "ID", "asc");

            if (Request.QueryString["id"] != null)
            {
                ViewState["pk_Payment"] = MojoCube.Api.Text.Security.DecryptString(Request.QueryString["id"]);

                MojoCube.Web.Payment.List list = new MojoCube.Web.Payment.List();
                list.GetData(int.Parse(ViewState["pk_Payment"].ToString()));

                txtTitle.Text        = list.Title;
                txtSubtitle.Text     = list.Subtitle;
                txtGateway.Text      = list.Gateway;
                txtService.Text      = list.Service;
                txtAccount.Text      = list.Account;
                txtAppID.Text        = list.AppID;
                txtSecret.Text       = list.Secret;
                txtPartnerID.Text    = list.PartnerID;
                txtKeyCode.Text      = list.KeyCode;
                txtSignType.Text     = list.SignType;
                txtInputCharset.Text = list.InputCharset;
                txtCurrency.Text     = list.Currency;
                txtRate.Text         = list.Rate.ToString();
                txtSortID.Text       = list.SortID.ToString();
                cbVisible.Checked    = list.Visible;

                MojoCube.Web.Sql.ddlFindByValue(ddlType, list.TypeID.ToString());

                if (list.ImagePath != "")
                {
                    SetImage(list.ImagePath);
                }

                this.Title = "支付编辑:" + txtTitle.Text.Trim();
            }
            else
            {
                this.Title = "支付编辑";
            }
        }
    }
Exemplo n.º 4
0
    private string CreateHistory()
    {
        MojoCube.Web.Order.List list = new MojoCube.Web.Order.List();
        list.GetData(int.Parse(ViewState["pk_Order"].ToString()));

        if (list.fk_Member.ToString() != Session["Member_UserID"].ToString())
        {
            Response.Redirect(MojoCube.Web.Site.Cache.GetUrlExtension("Order", strLanguage));
        }

        lblContactName.Text  = list.CustomerName;
        lblAddress.Text      = list.CustomerAddress;
        lblContactPhone.Text = list.CustomerPhone1;
        lblRemark.Text       = list.Remark;

        StringBuilder sb = new StringBuilder();

        sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.CreateDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 创建订单,订单编号【" + list.OrderNumber + "】<br/>");

        if (list.fk_Payment > 0)
        {
            MojoCube.Web.Payment.List payment = new MojoCube.Web.Payment.List();
            payment.GetData(list.fk_Payment);
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.PaymentDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 付款成功,【" + payment.Title + "】<br/>");
        }

        if (list.ShipperCode != "")
        {
            MojoCube.Web.Sys.Express express = new MojoCube.Web.Sys.Express();
            express.GetData(list.ShipperCode);
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.ShipmentDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 已发货," + express.FullName + ",运单号【" + list.LogisticCode + "】<br/>");

            DataTable dt = new DataTable();
            if (Session["LogisticCode_" + list.LogisticCode] != null)
            {
                dt = (DataTable)Session["LogisticCode_" + list.LogisticCode];
            }
            else
            {
                dt = MojoCube.Web.Express.Function.GetLogisticDT(list.ShipperCode, list.LogisticCode);
                Session["LogisticCode_" + list.LogisticCode] = dt;
            }
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(dt.Rows[i]["Time"].ToString()).ToString("yyyy-MM-dd HH:mm") + "]</span> " + dt.Rows[i]["Content"].ToString() + "<br/>");
                }
            }
        }

        if (list.StatusID == 3)
        {
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.EndDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 交易成功<br/>");
        }

        if (list.StatusID == 4)
        {
            sb.Append("<span style=\"font-size:8pt; color:#999; margin-left:3px;\">[" + DateTime.Parse(list.CancelDate).ToString("yyyy-MM-dd HH:mm") + "]</span> 交易关闭<br/>");
        }

        return(sb.ToString());
    }
Exemplo n.º 5
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (txtTitle.Text.Trim() == "")
        {
            AlertDiv.InnerHtml = MojoCube.Web.String.ShowAlert("danger", "请填写标题");
            return;
        }

        MojoCube.Api.File.Upload upload = new MojoCube.Api.File.Upload();
        upload.FilePath = "Payment";
        upload.FileName = MojoCube.Api.Text.Function.DateTimeString(true);
        upload.DoFileUpload(fuImage);

        MojoCube.Web.Payment.List list = new MojoCube.Web.Payment.List();

        //修改
        if (ViewState["pk_Payment"] != null)
        {
            list.GetData(int.Parse(ViewState["pk_Payment"].ToString()));
            list.Title        = txtTitle.Text.Trim();
            list.Subtitle     = txtSubtitle.Text.Trim();
            list.TypeID       = int.Parse(ddlType.SelectedValue);
            list.Gateway      = txtGateway.Text.Trim();
            list.Service      = txtService.Text.Trim();
            list.Account      = txtAccount.Text.Trim();
            list.AppID        = txtAppID.Text.Trim();
            list.Secret       = txtSecret.Text.Trim();
            list.PartnerID    = txtPartnerID.Text.Trim();
            list.KeyCode      = txtKeyCode.Text.Trim();
            list.SignType     = txtSignType.Text.Trim();
            list.InputCharset = txtInputCharset.Text.Trim();
            list.Currency     = txtCurrency.Text.Trim();
            list.Rate         = MojoCube.Web.String.ToDecimal(txtRate.Text.Trim());
            list.Visible      = cbVisible.Checked;
            list.SortID       = MojoCube.Web.String.ToInt(txtSortID.Text.Trim());
            if (upload.IsUpload)
            {
                list.ImagePath = upload.OldFilePath;
                SetImage(list.ImagePath);
            }
            list.ModifyDate   = DateTime.Now.ToString();
            list.ModifyUserID = int.Parse(Session["UserID"].ToString());
            list.UpdateData(list.pk_Payment);
        }
        //新增
        else
        {
            list.Title        = txtTitle.Text.Trim();
            list.Subtitle     = txtSubtitle.Text.Trim();
            list.TypeID       = int.Parse(ddlType.SelectedValue);
            list.Gateway      = txtGateway.Text.Trim();
            list.Service      = txtService.Text.Trim();
            list.Account      = txtAccount.Text.Trim();
            list.AppID        = txtAppID.Text.Trim();
            list.Secret       = txtSecret.Text.Trim();
            list.PartnerID    = txtPartnerID.Text.Trim();
            list.KeyCode      = txtKeyCode.Text.Trim();
            list.SignType     = txtSignType.Text.Trim();
            list.InputCharset = txtInputCharset.Text.Trim();
            list.Description  = string.Empty;
            list.Currency     = txtCurrency.Text.Trim();
            list.Rate         = MojoCube.Web.String.ToDecimal(txtRate.Text.Trim());
            list.Visible      = cbVisible.Checked;
            list.SortID       = MojoCube.Web.String.ToInt(txtSortID.Text.Trim());
            if (upload.IsUpload)
            {
                list.ImagePath = upload.OldFilePath;
                SetImage(list.ImagePath);
            }
            else
            {
                list.ImagePath = string.Empty;
            }
            list.CreateDate         = DateTime.Now.ToString();
            list.CreateUserID       = int.Parse(Session["UserID"].ToString());
            list.ModifyDate         = DateTime.Now.ToString();
            list.ModifyUserID       = 0;
            ViewState["pk_Payment"] = list.InsertData();
        }

        AlertDiv.InnerHtml = MojoCube.Web.String.ShowAlert("success", "数据保存成功");
    }