コード例 #1
0
    //保存
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (action == "Edit") //修改
        {
            if (!DoEdit(this.huiyuan_id))
            {
                mym.JscriptMsg(this.Page, "保存过程中发生错误!", "", "Error");
                return;
            }



            mym.JscriptMsg(this.Page, "修改服务中心信息成功!", Utils.CombUrlTxt("Service_Centre_un.aspx", "page={0}", this.page.ToString()), "Success");
        }
        else //添加
        {
            if (!DoAdd())
            {
                mym.JscriptMsg(this.Page, "保存过程中发生错误!", "", "Error");
                return;
            }
            mym.JscriptMsg(this.Page, "添加服务中心成功!", "Service_Centre_un.aspx", "Success");
        }
        //写入
    }
コード例 #2
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton       lb   = (LinkButton)sender;
        int              caId = int.Parse(lb.CommandArgument);
        tbl_sinkia_class bll  = new tbl_sinkia_class();

        bll.GetModel(caId);

        string      pro_class = bll.pro_class;
        tbl_product bllpp     = new tbl_product();

        bllpp.pro_pid = caId;
        if (!bllpp.ExistsBM())//查找是否存在下级商品
        {
            bll.Delete(caId);

            mym.JscriptMsg(this.Page, " 成功删除商品类别:" + pro_class + "", Utils.CombUrlTxt("pro_class_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
        }
        else
        {
            mym.JscriptMsg(this.Page, "有商品属于该商品类别,不能删除!", "", "Error");
            return;
        }
    }
コード例 #3
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton lb   = (LinkButton)sender;
        int        caId = int.Parse(lb.CommandArgument);
        ps_manager bll  = new ps_manager();

        bll.GetModel(caId);
        string title = bll.user_name;

        ps_join_depot bllqd = new ps_join_depot();

        bllqd.user_id = caId;
        ps_salse_depot bllss = new ps_salse_depot();

        bllss.user_id = caId;
        if (!bllqd.ExistsYH() && !bllss.ExistsCZXS())
        {
            bll.Delete(caId);
            mym.AddAdminLog("删除", "删除用户名(账号):" + title + ""); //记录日志
            mym.JscriptMsg(this.Page, " 成功删除用户名(账号):" + title + "", Utils.CombUrlTxt("manager_list.aspx", "status={0}&category_id={1}&depot_id={2}&keywords={3}&page={4}", this.status.ToString(), this.category_id.ToString(), this.depot_id.ToString(), this.keywords, this.page.ToString()), "Success");
        }
        else
        {
            mym.JscriptMsg(this.Page, "系统中有该用户的相关操作记录,不能删除!可以通过修改禁用该用户!", "", "Error");
            return;
        }
    }
コード例 #4
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton           lb   = (LinkButton)sender;
        int                  caId = int.Parse(lb.CommandArgument);
        tbl_sinkia_attribute bll  = new tbl_sinkia_attribute();

        bll.GetModel(caId);

        string      attribute_name = bll.attribute_name;
        tbl_product bllpp          = new tbl_product();

        bllpp.pro_level = caId;
        if (!bllpp.Existsshuxing())//查找是否存在下级商品
        {
            bll.Delete(caId);

            mym.JscriptMsg(this.Page, " 成功删除属性:" + attribute_name + "", Utils.CombUrlTxt("pro_attribute_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
        }
        else
        {
            mym.JscriptMsg(this.Page, "有商品属于该商品属性,不能删除!", "", "Error");
            return;
        }
    }
コード例 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../login.aspx'</script>");
            Response.End();
        }
        //判断权限
        tbl_admin_role_value myrv = new tbl_admin_role_value();
        int role_id = Convert.ToInt32(Session["RoleID"]);
        int nav_id  = 22;

        if (!myrv.QXExists(role_id, nav_id))
        {
            Response.Redirect("../error.html");
            Response.End();
        }
        order_no = AXRequest.GetQueryString("order_no");
        if (order_no == "")
        {
            mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
            return;
        }
        if (!new tbl_orders().Exists(order_no))
        {
            mym.JscriptMsg(this.Page, "订单不存在或已被删除!", "back", "Error");
            return;
        }
        if (!Page.IsPostBack)
        {
            ShowInfo(order_no);
        }
    }
コード例 #6
0
ファイル: Help_list.aspx.cs プロジェクト: limingwing/services
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton      lb   = (LinkButton)sender;
        int             caId = int.Parse(lb.CommandArgument);
        tbl_sinkia_help bll  = new tbl_sinkia_help();

        bll.GetModel(caId);
        bll.Delete(caId);

        mym.JscriptMsg(this.Page, " 成功删除商品类别:" + bll.help1 + "", Utils.CombUrlTxt("Help_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
    }
コード例 #7
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!DoEdit(1))
     {
         mym.JscriptMsg(this.Page, "保存过程中发生错误!", "", "Error");
         return;
     }
     //Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
     //AppSettingsSection appSettings = config.AppSettings;
     //appSettings.Settings["txt_time1"].Value = this.txt_time1.Value.Trim();
     //appSettings.Settings["txt_time2"].Value = this.txt_time2.Value.Trim();
     //config.Save();
     mym.JscriptMsg(this.Page, "修改信息成功!", Utils.CombUrlTxt("Deve_kuangji.aspx", "page={0}", this.page.ToString()), "Success");
 }
コード例 #8
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton lb   = (LinkButton)sender;
        int        caId = int.Parse(lb.CommandArgument);
        tbl_news   bll  = new tbl_news();

        bll.GetModel(caId);
        string title = bll.title;

        bll.Delete(caId);
        // mym.AddAdminLog("删除", "删除公告:" + title + ""); //记录日志
        mym.JscriptMsg(this.Page, " 成功删除公告:" + title + "", Utils.CombUrlTxt("al_read1.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
    }
コード例 #9
0
    //缺货
    protected void lbtnAcceptCa_Click(object sender, EventArgs e)
    {
        this.page = AXRequest.GetQueryInt("page", 1);
        // 当前点击的按钮
        LinkButton    lb   = (LinkButton)sender;
        int           caId = int.Parse(lb.CommandArgument);
        ps_here_depot bll  = new ps_here_depot();

        bll.GetModel(caId);
        bll.id     = caId;
        bll.status = 1;
        bll.UpdateStatus(); //更新是否缺货状态

        mym.JscriptMsg(this.Page, " 设置成功!", Utils.CombUrlTxt("depot_manager.aspx", "product_category_id={0}&note_no={1}", this.product_category_id.ToString(), txtNote_no.Text), "Success");
    }
コード例 #10
0
    //暂停订购
    protected void lbtnAcceptCaDG_Click(object sender, EventArgs e)
    {
        this.page = AXRequest.GetQueryInt("page", 1);
        // 当前点击的按钮
        LinkButton  lb   = (LinkButton)sender;
        int         caId = int.Parse(lb.CommandArgument);
        tbl_product bll  = new tbl_product();

        bll.GetModel(caId);
        bll.pro_id   = caId;
        bll.pro_isok = 0;
        bll.UpdateXS(); //更新是否暂停订购

        mym.JscriptMsg(this.Page, " 设置成功!", Utils.CombUrlTxt("pro_list.aspx", "product_category_id={0}&note_no={1}", this.product_category_id.ToString(), txtNote_no.Text), "Success");
    }
コード例 #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../index.aspx'</script>");
            Response.End();
        }
        //判断权限
        tbl_admin_role_value myrv = new tbl_admin_role_value();
        int role_id = Convert.ToInt32(Session["RoleID"]);
        int nav_id  = 82;

        if (!myrv.QXExists(role_id, nav_id))
        {
            Response.Redirect("../error.html");
            Response.End();
        }
        string _action = AXRequest.GetQueryString("action");

        this.page = AXRequest.GetQueryInt("page", 1);
        if (!string.IsNullOrEmpty(_action) && _action == "Edit")
        {
            this.action = "Edit";//修改类型
            if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
            {
                mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
                return;
            }
        }
        if (!Page.IsPostBack)
        {
            tbl_product bll = new tbl_product();
            DataTable   dt  = bll.GetList("pro_isok=1 order by salse_price asc").Tables[0];
            this.pid.Items.Clear();
            this.pid.Items.Add(new ListItem("请选择秒杀商品...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                string Id    = dr["pro_id"].ToString();
                string Title = dr["pro_name"].ToString().Trim();
                this.pid.Items.Add(new ListItem(Title, Id));
            }
            if (action == "Edit") //修改
            {
                ShowInfo(this.id);
            }
        }
    }
コード例 #12
0
 //保存
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!DoAdd())
     {
         mym.JscriptMsg(this.Page, "保存过程中发生错误!", "", "Error");
         return;
     }
     mym.JscriptMsg(this.Page, "增加新品成功!", "", "Success");
     txtproduct_name.Text = "";
     txtImgUrl.Text       = "";
     txtgo_price.Text     = "";
     txtsalse_price.Text  = "";
     txtproduct_num.Text  = "";
     txtdw.Text           = "";
     txtremark.Text       = "";
 }
コード例 #13
0
    //批量删除
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        int            sucCount   = 0; //成功数量
        int            errorCount = 0; //失败数量
        ps_manager_log bll        = new ps_manager_log();

        for (int i = 0; i < rptList.Items.Count; i++)
        {
            int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
            CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
            if (cb.Checked)
            {
                if (bll.Delete(id))
                {
                    sucCount++;
                }
                else
                {
                    errorCount++;
                }
            }
        }
        mym.AddAdminLog("删除", "删除用户操作日志成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
        mym.JscriptMsg(this.Page, " 删除用户操作日志成功" + sucCount + "条,失败" + errorCount + "条", Utils.CombUrlTxt("manager_log.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
    }
コード例 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../index.aspx'</script>");
            Response.End();
        }
        //判断权限
        tbl_admin_role_value myrv = new tbl_admin_role_value();
        int role_id = Convert.ToInt32(Session["RoleID"]);
        int nav_id  = 65;

        if (!myrv.QXExists(role_id, nav_id))
        {
            Response.Redirect("../error.html");
            Response.End();
        }
        string _action = AXRequest.GetQueryString("action");

        this.page = AXRequest.GetQueryInt("page", 1);
        if (!string.IsNullOrEmpty(_action) && _action == "Edit")
        {
            this.action = "Edit";//修改类型
            if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
            {
                mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
                return;
            }
        }
        if (!Page.IsPostBack)
        {
            if (action == "Edit") //修改
            {
                QDBind();
                attributebind();
                procityareabind(this.id);
                ShowInfo(this.id);

                Focus myFocus = new Focus();
                myFocus.SetEnterControl(this.txtsalse_price);
                myFocus.SetFocus(txtsalse_price.Page, "txtsalse_price");
            }
        }
    }
コード例 #15
0
ファイル: in_box.aspx.cs プロジェクト: limingwing/services
    //设置分页数量
    protected void txtPageNum_TextChanged(object sender, EventArgs e)
    {
        int _pagesize;

        if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
        {
            if (_pagesize >= 300)
            {
                mym.JscriptMsg(this.Page, "页面设置最大分页数为500数据,请重新输入!", "", "Error");
                return;
            }
            if (_pagesize > 0)
            {
                Utils.WriteCookie("liuyan_log_page_size", _pagesize.ToString(), 14400);
            }
        }
        Response.Redirect(Utils.CombUrlTxt("in_box.aspx", "keywords={0}", this.keywords));
    }
コード例 #16
0
ファイル: al_read3.aspx.cs プロジェクト: limingwing/services
    //设置分页数量
    protected void txtPageNum_TextChanged(object sender, EventArgs e)
    {
        int _pagesize;

        if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
        {
            if (_pagesize > 300)
            {
                mym.JscriptMsg(this.Page, "页面设置最大分页数为300数据,请重新输入!", "", "Error");
                return;
            }
            if (_pagesize > 0)
            {
                Utils.WriteCookie("al_read3_page_size", _pagesize.ToString(), 14400);
            }
        }
        Response.Redirect(Utils.CombUrlTxt("al_read3.aspx", "start_time={0}&stop_time={1}&huiyuan_jiebie={2}&note_no={3}&type={4}", this.txtstart_time.Value, this.txtstop_time.Value, this.ddlproduct_category_id.SelectedValue, txtNote_no.Text, this.type.SelectedValue));
    }
コード例 #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../index.aspx'</script>");
            Response.End();
        }
        //判断权限
        ps_manager_role_value myrv = new ps_manager_role_value();
        int role_id = Convert.ToInt32(Session["RoleID"]);
        int nav_id  = 29;

        if (!myrv.QXExists(role_id, nav_id))
        {
            Response.Redirect("../error.html");
            Response.End();
        }
        string _action = AXRequest.GetQueryString("action");

        this.page = AXRequest.GetQueryInt("page", 1);
        if (!string.IsNullOrEmpty(_action) && _action == "Edit")
        {
            this.action = "Edit";//修改类型
            if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
            {
                mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
                return;
            }
        }
        if (action == "Edit") //修改
        {
            txtUserName.Attributes.Remove("ajaxurl");
        }
        if (!Page.IsPostBack)
        {
            RoleBind(ddlRoleId, Convert.ToInt32(Session["RoleID"])); //绑定角色

            if (Convert.ToInt32(Session["RoleID"]) == 4)             //店长用户权限
            {
                this.ddlRoleId.SelectedValue = "5";
                role.Visible = false;
                bm.Visible   = false;
                md.Visible   = false;
                CategoryBind(Convert.ToInt32(Session["DepotCatID"])); //绑定地区
                this.ddlCategoryId.SelectedValue = Session["DepotCatID"].ToString();
                DepotBind(Convert.ToInt32(Session["DepotCatID"]));    //绑定商家
                this.ddlDepotId.SelectedValue = Session["DepotID"].ToString();
            }
            if (action == "Edit") //修改
            {
                ShowInfo(this.id);
            }
        }
    }
コード例 #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../index.aspx'</script>");
            Response.End();
        }
        //判断权限
        ps_manager_role_value myrv = new ps_manager_role_value();
        int role_id = Convert.ToInt32(Session["RoleID"]);
        int nav_id  = 31;

        if (!myrv.QXExists(role_id, nav_id))
        {
            Response.Redirect("../error.html");
            Response.End();
        }
        string _action = AXRequest.GetQueryString("action");

        this.page = AXRequest.GetQueryInt("page", 1);
        if (!string.IsNullOrEmpty(_action) && _action == "Edit")
        {
            this.action = "Edit";//修改类型
            if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
            {
                mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
                return;
            }
        }
        if (!Page.IsPostBack)
        {
            if (action == "Edit") //修改
            {
                ShowInfo(this.id);
            }
        }
    }
コード例 #19
0
    //保存
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ps_manager model = new ps_manager();

        model.GetModel(Convert.ToInt32(Session["AID"]));

        string userPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(txtOldPassword.Text.Trim(), "MD5");

        if (userPwd != model.password)
        {
            mym.JscriptMsg(this.Page, "旧密码不正确!", "", "Warning");
            return;
        }
        if (txtPassword.Text.Trim() != txtPassword1.Text.Trim())
        {
            mym.JscriptMsg(this.Page, "两次密码不一致!", "", "Warning");
            return;
        }
        model.password = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text.Trim(), "MD5");
        model.mobile   = txtmobile.Text.Trim();


        model.id = Convert.ToInt32(Session["AID"]);

        if (!model.UpdateMY())
        {
            ps_depot model1 = new ps_depot();
            model1.id = Convert.ToInt32(Litdepot_id.Text);
            model1.contact_address = txtcontact_address.Text.Trim();
            model1.UpdateAddress();

            mym.JscriptMsg(this.Page, "保存过程中发生错误!", "", "Error");
            return;
        }
        mym.AddAdminLog("修改", "修改个人信息:用户名:" + Lituser_name.Text); //记录日志
        mym.JscriptMsg(this.Page, "个人信息修改成功!请下次用新密码登陆!", "", "Success");
    }
コード例 #20
0
    // 取消订单
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        this.page = AXRequest.GetQueryInt("page", 1);
        // 当前点击的按钮
        LinkButton lb   = (LinkButton)sender;
        int        caId = int.Parse(lb.CommandArgument);
        ps_orders  bll  = new ps_orders();

        bll.Delete(caId);
        ps_order_goods bllg = new ps_order_goods();

        bllg.DeleteOid(caId);

        mym.JscriptMsg(this.Page, " 取消订单成功!", Utils.CombUrlTxt("my_order.aspx", "depot_category_id={0}&depot_id={1}&status={2}&start_time={3}&stop_time={4}&note_no={5}&page={6}", this.depot_category_id.ToString(), this.depot_id.ToString(), this.status.ToString(), this.txtstart_time.Value, this.txtstop_time.Value, txtNote_no.Text, this.page.ToString()), "Success");
    }
コード例 #21
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton          lb   = (LinkButton)sender;
        int                 caId = int.Parse(lb.CommandArgument);
        ps_product_category bll  = new ps_product_category();

        bll.GetModel(caId);
        string        title = bll.title;
        ps_here_depot bllpp = new ps_here_depot();

        bllpp.product_category_id = caId;
        if (!bllpp.ExistsBM())//查找是否存在下级商品
        {
            bll.Delete(caId);
            mym.AddAdminLog("删除", "删除商品类别:" + title + ""); //记录日志
            mym.JscriptMsg(this.Page, " 成功删除商品类别:" + title + "", Utils.CombUrlTxt("product_category_list.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
        }
        else
        {
            mym.JscriptMsg(this.Page, "有商品属于该商品类别,不能删除!", "", "Error");
            return;
        }
    }
コード例 #22
0
    // 单个删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton lb   = (LinkButton)sender;
        int        caId = int.Parse(lb.CommandArgument);
        ps_depot   bll  = new ps_depot();

        bll.GetModel(caId);
        string     title = bll.title;
        ps_manager bllpp = new ps_manager();

        bllpp.depot_id = caId;
        if (!bllpp.ExistsMD())//查找是否存在用户
        {
            bll.Delete(caId);
            mym.AddAdminLog("删除", "删除商家:" + title + ""); //记录日志
            mym.JscriptMsg(this.Page, " 成功删除商家:" + title + "", Utils.CombUrlTxt("depot_list.aspx", "status={0}&category_id={1}&keywords={2}&page={3}", this.status.ToString(), this.category_id.ToString(), this.keywords, this.page.ToString()), "Success");
        }
        else
        {
            mym.JscriptMsg(this.Page, "有用户属于该商家,不能删除!", "", "Error");
            return;
        }
    }
コード例 #23
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     if (!bll.Exists_hui_bianhao(this.huiyuan_bianhao.Text.Trim()))
     {
         mym.JscriptMsg(this.Page, "没有该编号!", "", "Error");
         return;
     }
     else
     {
         this.TreeView1.Nodes.Clear();
         this.bianhao = this.huiyuan_bianhao.Text.Trim();
         bll.GetModel_hui_bianhao(this.bianhao);
         this.huiyuan_id = bll.huiyuan_id;
         LoadTreeData();
     }
 }
コード例 #24
0
    //设置分页数量
    protected void txtPageNum_TextChanged(object sender, EventArgs e)
    {
        int _pagesize;

        if (int.TryParse(txtPageNum.Text.Trim(), out _pagesize))
        {
            if (_pagesize > 300)
            {
                mym.JscriptMsg(this.Page, "页面设置最大分页数为300数据,请重新输入!", "", "Error");
                return;
            }
            if (_pagesize > 0)
            {
                Utils.WriteCookie("al_read2_page_size", _pagesize.ToString(), 14400);
            }
        }
        Response.Redirect(Utils.CombUrlTxt("sj_list.aspx", "note_no={0}&type={1}", txtNote_no.Text, this.type.SelectedValue));
    }
コード例 #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../login.aspx'</script>");
            Response.End();
        }

        if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
        {
            mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
            return;
        }

        if (!Page.IsPostBack)
        {
            ShowInfo(this.id);
        }
    }
コード例 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断是否登录
        if (!mym.IsAdminLogin())
        {
            Response.Write("<script>parent.location.href='../index.aspx'</script>");
            Response.End();
        }
        //判断权限
        tbl_admin_role_value myrv = new tbl_admin_role_value();
        int role_id = Convert.ToInt32(Session["RoleID"]);
        int nav_id  = 95;

        if (!myrv.QXExists(role_id, nav_id))
        {
            Response.Redirect("../error.html");
            Response.End();
        }
        string _action = AXRequest.GetQueryString("action");

        this.page = AXRequest.GetQueryInt("page", 1);
        if (!string.IsNullOrEmpty(_action) && _action == "Edit")
        {
            this.action = "Edit";//修改类型
            if (Utils.ProcessSqlStr(AXRequest.GetQueryString("id")))
            {
                this.id = Utils.Filter(AXRequest.GetQueryString("id"));
            }
            else
            {
                mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
                return;
            }


            // Response.Write(this.id);
        }



        if (!string.IsNullOrEmpty(_action) && _action == "Login")
        {
            this.action = "Login";//修改类型
            if (Utils.ProcessSqlStr(AXRequest.GetQueryString("id")))
            {
                this.id = Utils.Filter(AXRequest.GetQueryString("id"));
            }
            else
            {
                mym.JscriptMsg(this.Page, "传输参数不正确!", "back", "Error");
                return;
            }


            // Response.Write(this.id);
        }
        if (!Page.IsPostBack)
        {
            if (action == "Edit") //修改
            {
                // QDBind();
                //cnBind();
                //yhBind();//绑定银行
                ShowInfo(this.id);
                //Focus myFocus = new Focus();
                //myFocus.SetEnterControl(this.txtsalse_price);
                //myFocus.SetFocus(txtsalse_price.Page, "txtsalse_price");
            }
        }
    }
コード例 #27
0
    //提交订单
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        int    user_id           = 0;
        int    depot_category_id = 0;
        int    depot_id          = 0;
        string user_name         = string.Empty;

        user_id           = Convert.ToInt32(Session["AID"]);
        depot_category_id = Convert.ToInt32(Session["DepotCatID"]);
        depot_id          = Convert.ToInt32(Session["DepotID"]);
        user_name         = Session["AdminName"].ToString();

        //检查购物车商品
        IList <cart_items> iList = ShopCart.GetList();

        if (iList == null)
        {
            mym.JscriptMsg(this.Page, "对不起,购物车为空,无法结算!", "", "Error");
            return;
        }

        //统计购物车
        cart_total cartModel = ShopCart.GetTotal();

        //判断是否有商品
        if (cartModel.payable_amount == 0)
        {
            mym.JscriptMsg(this.Page, "对不起,购物车为空,无法结算!", "", "Error");
            return;
        }

        //保存订单=======================================================================
        ps_orders model = new ps_orders();

        model.order_no          = Utils.GetOrderNumber(); //订单号B开头为商品订单
        model.user_id           = user_id;
        model.depot_category_id = depot_category_id;
        model.depot_id          = depot_id;
        model.user_name         = user_name;
        model.payment_id        = 1;//未支付
        model.message           = message.Text;
        model.payable_amount    = cartModel.payable_amount;
        model.real_amount       = 0;

        //订单总金额=实付商品金额
        model.order_amount = cartModel.payable_amount;
        model.add_time     = DateTime.Now;


        if (model.Add() == 0)
        {
            mym.JscriptMsg(this.Page, "订单保存过程中发生错误,请重新提交!", "", "Error");
            return;
        }
        //商品详细列表
        ps_order_goods gls = new ps_order_goods();
        ps_here_depot  my  = new ps_here_depot();

        foreach (cart_items item in iList)
        {
            my.GetModel(item.id);
            gls.order_id            = model.GetMaxId();
            gls.goods_id            = item.id;
            gls.goods_title         = item.title;
            gls.goods_price         = my.go_price;
            gls.real_price          = item.price;
            gls.quantity            = item.quantity;
            gls.product_category_id = item.product_category_id;
            gls.dw = item.dw;
            gls.Add();
        }
        //清空购物车
        ShopCart.Clear("0");
        //提交成功,返回URL
        mym.JscriptMsg(this.Page, "恭喜您,订单已成功提交!", "my_order.aspx", "Success");
        return;
    }