示例#1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        AllinOrder AllinOrder1 = new AllinOrder();
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        string sql = "";

        sql = "SELECT * FROM TB_ORDER WHERE order_code = '" + ck.CheckInput(GetRequestQueryString("orderid", "0")) + "'";

        ds = cn.mdb_ds(sql,"TB_ORDER");

        string userid = ds.Tables["TB_ORDER"].Rows[0]["order_forward"].ToString();

        string ping = "";

        if (RadioButtonList1.SelectedValue == "1")
        {
            ping = "haoping";
        }

        if (RadioButtonList1.SelectedValue == "0")
        {
            ping = "zhongping";
        }

        if (RadioButtonList1.SelectedValue == "-1")
        {
            ping = "chaping";
        }

        sql = "UPDATE TB_ORDER_ACCOUNT SET POINT = POINT + " + RadioButtonList1.SelectedValue + "," + ping + " = " + ping + " + 1 WHERE userid = " + userid;
        cn.mdb_exe(sql);

        sql = "UPDATE TB_ORDER SET yiping_forward = 1,ping_forward = ping_forward + " + RadioButtonList1.SelectedValue + ",evaluation_forward = '" + TextBox1.Text + "' WHERE order_code = '" + ck.CheckInput(GetRequestQueryString("orderid", "0")) + "'";
        cn.mdb_exe(sql);

        AllinOrder1.SetUserStar(userid);

        Response.Redirect("order_success.aspx?type=evaluation&orderid=" + GetRequestQueryString("orderid", "0"));
    }
示例#2
0
    public void LoadSavedOrder()
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        GetRequest GetRequest1 = new GetRequest();

        string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));
        string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0"));
        string role = GetRequest1.GetRequestQueryString("role", "");

        AllinOrder AllinOrder1 = new AllinOrder();
        string[] odetail;
        odetail = AllinOrder1.GetOrderDetail(orderid);
        ltrOrderViewCode.Text = odetail[0];
        ltrOrderViewShipper.Text = odetail[8];
        ltrOrderViewConsignee.Text = odetail[9];
        ltrOrderViewNotifyParty.Text = odetail[10];
        ltrOrderViewCompanyName.Text = odetail[11];
        ltrOrderViewEmail.Text = odetail[12];
        ltrOrderViewContactor.Text = odetail[13];
        ltrOrderViewMobile.Text = odetail[14];
        ltrOrderViewTel.Text = odetail[15];
        ltrOrderViewFax.Text = odetail[16];
        ltrOrderViewStartport.Text = odetail[17];
        ltrOrderViewMidport.Text = odetail[18];
        ltrOrderViewDestport.Text = odetail[19];
        ltrOrderViewMarksNumbers.Text = odetail[20];
        ltrOrderViewNumbersofPackages.Text = odetail[21];
        ltrOrderViewDescription.Text = odetail[22];
        ltrOrderViewGrossWeight.Text = odetail[23];
        ltrOrderViewMeasurement.Text = odetail[24];
        ltrOrderViewCarrier.Text = odetail[26];
        ltrOrderViewKaihangri.Text = odetail[27];
        ltrOrderViewZhuangxiangri.Text = odetail[28];
        ltrOrderViewJieguanri.Text = odetail[29];
        ltrOrderViewGP.Text = odetail[34];
        ltrFreightGP.Text = odetail[49];
        ltrFreightGPV.Text = odetail[50];
        ltrFreightAppend.Text = odetail[44];
        ltrFreightCarrier.Text = odetail[68];
        ltrOrderViewHyf.Text = odetail[59];
        ltrOrderViewBeizhu.Text = odetail[36];
        ltrOverageThis.Text = odetail[62];
        txt_edit_pricegp.Text = odetail[49];
        txt_edit_pricegpv.Text = odetail[50];
        txt_edit_price_shipcompany.Text = odetail[68];

        if (odetail[44] != "")
        {
            ltrOrderFujiafei.Text = "(附加费:" + odetail[44] + ")";
        }

        SetStep(odetail[1], odetail[37], odetail[38]);

        if (u != odetail[3] & u != odetail[4])
        {
            Response.Redirect("/search/err.aspx");
        }//不是买卖双方的用户无法查看该订单!

        string order_type_string = odetail[58];

        if (role == "shipper")
        {
            PlaceHolder3.Visible = true;
            ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:left; background:#FFFCF3;border:1px solid #F7E4A5;\">" + odetail[89].Replace("{1}", orderid).Replace("{9}", order_type_string) + "</div>";

            if (u != odetail[3])
            {
                Response.Redirect("/search/err.aspx");
            }//不是买卖双方的用户无法查看该订单!

        }//订舱方显示的文本

        if (role == "forward")
        {
            PlaceHolder4.Visible = true;
            ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:left; background:#FFFCF3;border:1px solid #F7E4A5;\">" + odetail[90].Replace("{1}", orderid).Replace("{9}", order_type_string) + "</div>";

            if (u != odetail[4])
            {
                Response.Redirect("/search/err.aspx");
            }//不是买卖双方的用户无法查看该订单!

            if (odetail[1] != "2")
            {
                phEditDisabled.Visible = true;
                phEditEnabled.Visible = false;
            }
            else
            {
                phEditDisabled.Visible = false;
                phEditEnabled.Visible = true;
            }
        }//承运方显示的文本

        if (odetail[1] != "2")
        {
            PlaceHolder2.Visible = false;
            PlaceHolder1.Visible = false;
        }

        ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>";

        AllinFreight AllinFreight1 = new AllinFreight();
        string[] fdetail;
        if (odetail[7] == "0")
        {
            fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0");
        }
        else
        {
            fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7]));
        }

        ltrEndDate.Text = Convert.ToDateTime(fdetail[6]).ToString("yyyy-MM-dd");
        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";
        ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd");
        ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd");
        ltrFreightCompany.Text = fdetail[18];
        ltrFreightAllinStar.Text = fdetail[19];
        ltrFreightUserStar.Text = fdetail[20];
        ltrFreightLine.Text = odetail[69];
        ltrFreightStartport.Text = odetail[70];
        ltrFreightDestport.Text = odetail[71];
        ltrFreightAssuranceSpace.Text = odetail[100];
        ltrFreightAssurancePrice.Text = odetail[101];
        lblTousu.Text = fdetail[18];

        AllinUser AllinUser1 = new AllinUser();
        string[] udetail;
        udetail = AllinUser1.GetUserDetail(u);
        txtbank.Value = udetail[50];
        txtbankname.Value = udetail[51];
        txtbankaccount.Value = udetail[52];
        txtotheraccount.Value = udetail[53];
        ltrOverageTotal.Text = udetail[55];
        ltrOverageAvailable.Text = (Convert.ToInt32(ltrOverageTotal.Text) - Convert.ToInt32(ltrOverageThis.Text)).ToString();
        ltrPayJump.Text = "<a href=\"/member/order/pay_sel_single.aspx?orderid=" + orderid + "\">立即充值</a>";

        //if (Convert.ToInt32(ltrOverageTotal.Text) - Convert.ToInt32(ltrOverageThis.Text) >= 0)
        //{
        //    PlaceHolder8.Visible = true;
        //    PlaceHolder9.Visible = false;
        //    PlaceHolder10.Visible = true;
        //    PlaceHolder11.Visible = false;
        //}
        //else
        //{
        //    PlaceHolder8.Visible = false;
        //    PlaceHolder9.Visible = true;
        //    PlaceHolder10.Visible = false;
        //    PlaceHolder11.Visible = true;
        //}

        PlaceHolder8.Visible = true;
        PlaceHolder9.Visible = false;
        PlaceHolder10.Visible = true;
        PlaceHolder11.Visible = false;
    }
示例#3
0
    public void LoadEditOrder()
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        GetRequest GetRequest1 = new GetRequest();

        string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));
        string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0"));
        string role = GetRequest1.GetRequestQueryString("role", "");

        AllinOrder AllinOrder1 = new AllinOrder();
        string[] odetail;
        odetail = AllinOrder1.GetOrderDetail(orderid);

        ltrHyf.Text = odetail[59];

        txtPubf.Text = odetail[4];
        txtCode.Value = odetail[0];
        txtShipper.Value = odetail[8];
        txtConsignee.Value = odetail[9];
        txtNotifyParty.Value = odetail[10];
        txtCompanyName.Value = odetail[11];
        txtEmail.Value = odetail[12];
        txtContactor.Value = odetail[13];
        txtMobile.Value = odetail[14];
        txtTel.Value = odetail[15];
        txtFax.Value = odetail[16];
        txtstartport.Value = odetail[17];
        txtmidport.Value = odetail[18];
        txtdestport.Value = odetail[19];
        txtMarksNumbers.Value = odetail[20];
        txtNumbersofPackages.Value = odetail[21];
        txtDescription.Value = odetail[22];
        txtGrossWeight.Value = odetail[23];
        txtMeasurement.Value = odetail[24];
        txtkaihangri.Value = odetail[27];
        txtzhuangxiangri.Value = odetail[28];
        txtjieguanri.Value = odetail[29];
        ltrEndDate.Text = odetail[105];
        txtcarrier_name.Value = odetail[26];

        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";

        txtgp.Value = odetail[34];

        if (odetail[44] != "")
        {
            ltrOrderFujiafei1.Text = "(附加费:" + odetail[44] + ")";
        }

        ltrFreightGP.Text = odetail[49];
        ltrFreightGPV.Text = odetail[50];
        ltrFreightAppend.Text = odetail[44];
        ltrFreightCarrier.Text = odetail[68];

        txtbeizhu.Value = odetail[36];
        SetStep(odetail[1], odetail[37], odetail[38]);

        ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>";

        if (u != odetail[3])
        {
            Response.Redirect("/search/err.aspx");
        }//不是买方的用户无修改订单!

        if (odetail[1] != "2" & odetail[1] != "3" & odetail[1] != "7")
        {
            Response.Redirect("/search/err.aspx");
        }//排除不能修改的订单状态!

        ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:center; background:#FFFCF3;border:1px solid #F7E4A5;\">修改订舱单</div>";

        AllinFreight AllinFreight1 = new AllinFreight();
        string[] fdetail;
        if (odetail[7] == "0")
        {
            fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0");
        }
        else
        {
            fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7]));
        }

        ltrEndDate.Text = Convert.ToDateTime(fdetail[6]).ToString("yyyy-MM-dd");
        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";
        ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd");
        ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd");
        ltrFreightCompany.Text = fdetail[18];
        ltrFreightAllinStar.Text = fdetail[19];
        ltrFreightUserStar.Text = fdetail[20];
        ltrFreightLine.Text = odetail[69];
        ltrFreightStartport.Text = odetail[70];
        ltrFreightDestport.Text = odetail[71];
        ltrFreightAssuranceSpace.Text = odetail[100];
        ltrFreightAssurancePrice.Text = odetail[101];
        lblTousu.Text = fdetail[18];

        AllinUser AllinUser1 = new AllinUser();
        string[] udetail;
        udetail = AllinUser1.GetUserDetail(u);
        txtbank.Value = udetail[50];
        txtbankname.Value = udetail[51];
        txtbankaccount.Value = udetail[52];
        txtotheraccount.Value = udetail[53];
        txtaliaccount.Value = udetail[9];
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            AllinOrder AllinOrder1 = new AllinOrder();
            GetRequest GetRequest1 = new GetRequest();

            string u = GetRequest1.GetRequestCookies("user_id", "0");

            if (u == "0")
            {

            }
            else
            {
                if (AllinOrder1.GetOrderTry(u) == "success")
                {
                    Response.Redirect("tryalready.aspx");
                }
                else
                {
                    AllinOrder1.SetOrderTry(u);
                    Response.Redirect("trysuccess.aspx");
                }

            }
        }
    }
示例#5
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        check ck = new check();
        data_conn cn = new data_conn();
        string sql = "";
        sql = sql + "select * ";
        sql = sql + "from TB_User ";
        sql = sql + "where UserName = '******'";
        DataSet ds = new DataSet();
        ds = cn.mdb_ds(sql, "T_User");

        if (ds.Tables["T_User"].Rows.Count > 0)
        {
            MessageBox("opfail", "用户名已有人使用");
            return;
        }
        else if (UserPassword.Value.Length < 6 || UserPassword.Value.Length > 15)
        {
            MessageBox("opfail", "密码长度必须在6~15个字符之间");
            return;
        }
        else if (Company.Value == "" || RealName.Value == "" || Phone.Value == "" || UserEmail.Value == "")
        {
            MessageBox("opfail", "必填项不能为空");
            return;
        }
        else if (!isEmail(UserEmail.Value))
        {
            MessageBox("opfail", "邮箱格式不正确");
            return;
        }
        else if (UserPassword.Value != UserPassword2.Value)
        {
            MessageBox("opfail", "2次密码不一致");
            return;
        }
        else if (!Checkbox1.Checked)
        {

            MessageBox("opfail", "请仔细阅读并同意服务条款");
            return;
        }

        string recommendUserID;
        if (this.Request.Cookies["recommendUserID"] == null)
        {
            recommendUserID = "0";
        }
        else
        {
            if (this.Request.Cookies["recommendUserID"].Value == "")
            {
                recommendUserID = "0";
            }
            else
            {
                recommendUserID = Request.Cookies["recommendUserID"].Value;
            }
        }

        if (this.Request.Cookies["UID"] == null)
        {

        }
        else
        {
            if (Request.Cookies["UID"].Value == "")
            {

            }
            else
            {
                data_conn Uidcn = new data_conn();
                DataSet Uidds = Uidcn.mdb_ds("select UserID from TB_User where UCenterHomeUid=" + Request.Cookies["UID"].Value, "uid");
                if (Uidds.Tables["uid"].Rows.Count == 1)
                {
                    recommendUserID = Uidds.Tables["uid"].Rows[0][0].ToString();
                    mysqldata_conn mycn = new mysqldata_conn();
                    mycn.mdb_exe("update uchome_space set credit=credit+10 where uid=" + Request.Cookies["UID"].Value);
                }
            }
        }

        sql = "";
        sql += "INSERT INTO ";
        sql += "TB_User ";
        sql += "(";
        sql += "UserName, ";
        sql += "UserPassword, ";
        sql += "UserEmail, ";
        sql += "UserPoint, ";
        sql += "RealName, ";
        sql += "IfPass, ";
        sql += "ifvip, ";
        sql += "ifmanage, ";
        sql += "CompanyName, ";
        sql += "Phone, ";
        sql += "Regtime)";
        sql += "VALUES ";
        sql += "(";

        sql += "'" + ck.CheckInput(UserName.Value.ToString()) + "', ";
        sql += "'" + ck.CheckInput(UserPassword.Value.ToString()) + "', ";
        sql += "'" + ck.CheckInput(UserEmail.Value.ToString()) + "', ";
        sql += "0, ";
        sql += "'" + ck.CheckInput(RealName.Value.ToString()) + "', ";

        sql += "1, ";
        sql += "1, ";
        sql += "0, ";
        sql += "'" + ck.CheckInput(Company.Value.ToString()) + "', ";
        sql += "'" + ck.CheckInput(Phone.Value.ToString()) + "', ";
        sql += "'" + ck.CheckInput(DateTime.Now.ToString()) + "' ";
        sql += ")";
        cn.mdb_exe(sql);
        sql = "SELECT * FROM TB_User WHERE UserName = '******'";

        ds = cn.mdb_ds(sql, "user");

        string sql_account = "insert into TB_ORDER_ACCOUNT (userid) VALUES (" + ds.Tables["user"].Rows[0]["UserID"].ToString() + ")";
        cn.mdb_exe(sql_account);
        //增加账户信息

        AllinOrder AllinOrder1 = new AllinOrder();
        AllinOrder1.SetOrderTry(ds.Tables["user"].Rows[0]["UserID"].ToString());

        if (ds.Tables["user"].Rows.Count != 0)
        {
            try
            {
                points p = new points();
                p.AddNewPoints(ds.Tables["user"].Rows[0]["UserID"].ToString());
            }
            catch (Exception ex)
            {

            }

            string userid = ds.Tables["user"].Rows[0]["UserID"].ToString();
            string usernm = ds.Tables["user"].Rows[0]["UserName"].ToString();
            string ifvip = ds.Tables["user"].Rows[0]["ifvip"].ToString();
            string ifmanage = ds.Tables["user"].Rows[0]["ifmanage"].ToString();
            string realname = ds.Tables["user"].Rows[0]["realname"].ToString();
            string useremail = ds.Tables["user"].Rows[0]["useremail"].ToString();

            Response.Cookies["user_id"].Value = userid;
            Response.Cookies["user_name"].Value = Server.UrlEncode(usernm);
            Response.Cookies["ifvip"].Value = ifvip;
            Response.Cookies["ifmanage"].Value = ifmanage;

            Response.Cookies["user_id"].Expires = DateTime.Now.AddDays(365);
            Response.Cookies["user_name"].Expires = DateTime.Now.AddDays(365);
            Response.Cookies["ifvip"].Expires = DateTime.Now.AddDays(365);
            Response.Cookies["ifmanage"].Expires = DateTime.Now.AddDays(365);

            Response.Cookies["realname"].Value = Server.UrlEncode(realname);
            Response.Cookies["useremail"].Value = Server.UrlEncode(useremail);

            Response.Cookies["realname"].Expires = DateTime.Now.AddDays(365);
            Response.Cookies["useremail"].Expires = DateTime.Now.AddDays(365);

            if (recommendUserID != "0")
            {
                cn.mdb_exe("insert into T_FRIEND (UID,FID) values (" + userid + "," + recommendUserID + ")");
                cn.mdb_exe("insert into T_FRIEND (UID,FID) values (" + recommendUserID + "," + userid + ")");
                Mark mark = new Mark();
                mark.MarkOperate(Convert.ToInt32(recommendUserID), 10, "推荐会员", Convert.ToInt32(userid));
            }

            mysqldata_conn mysqlcn = new mysqldata_conn();
            DataSet dscount = mysqlcn.mdb_ds("select * from uc_members where username='******'", "ucenter");

            if (dscount.Tables["ucenter"].Rows.Count == 0)
            {
                Random r = new Random();
                string salt = r.Next().ToString().Substring(0, 6);
                string username = usernm;
                string password = MD5(MD5(ds.Tables["user"].Rows[0]["UserPassword"].ToString()) + salt);
                string email = ds.Tables["user"].Rows[0]["UserEmail"].ToString();
                string myid = "";
                string myidkey = "";
                string regip = Page.Request.UserHostAddress;
                string regdate = UnixTimestamp();
                string lastloginip = "0";
                string lastlogintime = "0";

                string id = this.insert(username, "8fc24ae194289b94e36272a5f9882611", email, myid, myidkey, regip, regdate, lastloginip, lastlogintime, "594882");

                if (id != "")
                {
                    mysqlcn.mdb_exe("insert into uchome_member (uid,username,password) values (" + id + ",'','" + MD5(id + "|" + UnixTimestamp()) + "')");
                    mysqlcn.mdb_exe("insert into uc_memberfields (uid,blacklist) values (" + id + ",'')");

                    string myemail;
                    string qq;
                    string msn;
                    if (ds.Tables["user"].Rows[0]["UserEmail"].ToString() != "")
                    {
                        myemail = ds.Tables["user"].Rows[0]["UserEmail"].ToString();
                    }
                    else
                    {
                        myemail = "";
                    }

                    qq = "";
                    msn = "";

                    mysqlcn.mdb_exe("insert into uchome_spacefield (uid,email,qq,msn,blood,birthprovince,birthcity,resideprovince,residecity,note,spacenote,authstr,theme,css,privacy,friend,feedfriend,sendmail) values (" + id + ",'" + myemail + "','" + qq + "','" + msn + "','','','','','','','','','','','','','','')");

                    //插入实名
                    string namestatus = "0";

                    //实名

                    mysqlcn.mdb_exe("insert into uchome_space (uid,groupid,username,name,namestatus,domain,dateline,ip) values (" + id + ",5,'" + username + "',''," + namestatus + ",''," + UnixTimestamp() + ",'" + Page.Request.UserHostAddress + "')");
                    cn.mdb_exe("update TB_User set UCenterHomeUid=" + id + " where UserId=" + userid);

                    //在ucenter中添加推荐好友

                    if (Request.Cookies["UID"] == null)
                    {

                    }
                    else
                    {
                        if (Request.Cookies["UID"].Value == "")
                        {

                        }

                        else
                        {

                            string gid = "0";
                            if (this.Request.Cookies["g"] == null)
                            {

                            }
                            else
                            {
                                if (Request.Cookies["g"].Value == "")
                                {

                                }
                                else
                                {
                                    gid = Request.Cookies["g"].Value;
                                    try
                                    {
                                        int g = Convert.ToInt32(gid);

                                        if (g > 0 && g < 8)
                                        {
                                            gid = g.ToString();
                                        }
                                        else
                                        {
                                            gid = "0";
                                        }
                                    }
                                    catch (Exception ex)
                                    {
                                        gid = "0";
                                    }
                                }

                            }

                            DataSet myUidds = mysqlcn.mdb_ds("select username from uc_members where uid=" + Request.Cookies["UID"].Value, "uid");
                            mysqlcn.mdb_exe("insert into uchome_friend (uid,fuid,fusername,status,gid,note,dateline) values (" + id + "," + Request.Cookies["UID"].Value + ",'" + myUidds.Tables["uid"].Rows[0][0].ToString() + "',1,0,''," + UnixTimestamp() + ")");
                            mysqlcn.mdb_exe("insert into uchome_friend (uid,fuid,fusername,status,gid,note,dateline) values (" + Request.Cookies["UID"].Value + "," + id + ",'" + username + "',1," + gid + ",''," + UnixTimestamp() + ")");
                            mysqlcn.mdb_exe("insert into uc_friends (uid,friendid,direction,comment) values (" + id + "," + Request.Cookies["UID"].Value + ",3,'')");
                            mysqlcn.mdb_exe("insert into uc_friends (uid,friendid,direction,comment) values (" + Request.Cookies["UID"].Value + "," + id + ",3,'')");
                        }
                    }

                }

            }
            Response.Cookies["useremail"].Value = UserEmail.Value.ToString();

            try
            {
                SendEmail(UserName.Value.ToString(), UserPassword.Value.ToString(), UserEmail.Value.ToString(), "GB");
            }
            catch (Exception ex)
            {
                Response.Redirect("trysuccess.aspx");
            }

        }
    }
示例#6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        check ck = new check();
        string username = ck.CheckInput(txtUsername.Value);
        string password = ck.CheckInput(txtPassword.Value);
        string autologin = "******";

        if (chkAutoLogin.Checked == true)
        {
            autologin = "******";
        }
        else
        {
            autologin = "******";
        }

        if (username == "" && password == "")
        {
            MessageBox("opfail", "未填写用户名和密码");
        }
        else
        {
            if (username == "")
            {
                MessageBox("opfail", "未填写用户名");
            }
            if (password == "")
            {
                MessageBox("opfail", "未填写密码");
            }
        }

        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        string sql = "";

        sql = sql + "SELECT ";
        sql = sql + "UserID,UserName,ifvip,ifmanage ";
        sql = sql + "FROM ";
        sql = sql + "TB_User ";
        sql = sql + "WHERE ";
        sql = sql + "UserName = '******' ";
        sql = sql + "AND UserPassword = '******' ";

        ds = cn.mdb_ds(sql, "user");

        if (ds.Tables["user"].Rows.Count > 0)
        {
            string userid = ds.Tables["user"].Rows[0][0].ToString();
            string usernm = ds.Tables["user"].Rows[0][1].ToString();
            string ifvip = ds.Tables["user"].Rows[0]["ifvip"].ToString();
            string ifmanage = ds.Tables["user"].Rows[0]["ifmanage"].ToString();

            Response.Cookies["user_id"].Value = userid;
            Response.Cookies["user_name"].Value = Server.UrlEncode(usernm);
            Response.Cookies["user_password"].Value = password;
            Response.Cookies["ifvip"].Value = ifvip;
            Response.Cookies["ifmanage"].Value = ifmanage;

            if (autologin == "1")
            {
                Response.Cookies["user_id"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["user_name"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["user_password"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["ifvip"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["ifmanage"].Expires = DateTime.Now.AddDays(365);
            }

            AllinOrder AllinOrder1 = new AllinOrder();
            GetRequest GetRequest1 = new GetRequest();

            string u = GetRequest1.GetRequestCookies("user_id", "0");

            if (AllinOrder1.GetOrderTry(u) == "success")
            {
                Response.Redirect("tryalready.aspx");
            }
            else
            {
                AllinOrder1.SetOrderTry(u);
                Response.Redirect("trysuccess.aspx");
            }

        }
        else
        {
            MessageBox("opfail", "用户名或密码填写错误");
        }
    }
示例#7
0
    public void LoadSavedOrder()
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        GetRequest GetRequest1 = new GetRequest();

        string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));
        string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0"));
        string role = GetRequest1.GetRequestQueryString("role", "");

        AllinOrder AllinOrder1 = new AllinOrder();
        string[] odetail;
        odetail = AllinOrder1.GetOrderDetail(orderid);
        ltrOrderViewCode.Text = odetail[0];
        ltrOrderViewShipper.Text = odetail[8];
        ltrOrderViewConsignee.Text = odetail[9];
        ltrOrderViewNotifyParty.Text = odetail[10];
        ltrOrderViewCompanyName.Text = odetail[11];
        ltrOrderViewEmail.Text = odetail[12];
        ltrOrderViewContactor.Text = odetail[13];
        ltrOrderViewMobile.Text = odetail[14];
        ltrOrderViewTel.Text = odetail[15];
        ltrOrderViewFax.Text = odetail[16];
        ltrOrderViewStartport.Text = odetail[17];
        ltrOrderViewMidport.Text = odetail[18];
        ltrOrderViewDestport.Text = odetail[19];
        ltrOrderViewMarksNumbers.Text = odetail[20];
        ltrOrderViewNumbersofPackages.Text = odetail[21];
        ltrOrderViewDescription.Text = odetail[22];
        ltrOrderViewGrossWeight.Text = odetail[23];
        ltrOrderViewMeasurement.Text = odetail[24];
        ltrOrderViewCarrier.Text = odetail[26];
        ltrOrderViewKaihangri.Text = odetail[27];
        ltrOrderViewZhuangxiangri.Text = odetail[28];
        ltrOrderViewJieguanri.Text = odetail[29];
        ltrOrderViewGP.Text = odetail[34];
        ltrFreightGP.Text = odetail[49];
        ltrFreightGPV.Text = odetail[50];
        ltrFreightAppend.Text = odetail[44];
        ltrFreightCarrier.Text = odetail[26];
        ltrOrderViewHyf.Text = odetail[59];
        ltrOrderViewBeizhu.Text = odetail[36];

        if (odetail[44] != "")
        {
            ltrOrderFujiafei.Text = "(附加费:" + odetail[44] + ")";
        }

        string order_type_string = odetail[58];

        ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>";

        AllinFreight AllinFreight1 = new AllinFreight();
        string[] fdetail;
        if (odetail[7] == "0")
        {
            fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0");
        }
        else
        {
            fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7]));
        }

        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";
        ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd");
        ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd");
        ltrFreightCompany.Text = fdetail[18];
        ltrFreightAllinStar.Text = fdetail[19];
        ltrFreightUserStar.Text = fdetail[20];
        ltrFreightLine.Text = odetail[69];
        ltrFreightStartport.Text = odetail[70];
        ltrFreightDestport.Text = odetail[71];
        ltrFreightAssuranceSpace.Text = odetail[100];
        ltrFreightAssurancePrice.Text = odetail[101];

        ltrOrderFirstStep.Text = odetail[2] + ":订舱方 " + odetail[107] + " 创建订单";

        string sql = "";
        sql += "SELECT * FROM TB_ORDER_DETAIL WHERE order_code = '" + orderid + "'";

        ds = cn.mdb_ds(sql, "order");
        rptOrder.DataSource = ds.Tables["order"].DefaultView;
        rptOrder.DataBind();
    }
示例#8
0
    public string[] GetFreightDetail(string ftype,string yid,string ydid)
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        AllinOrder AllinOrder1 = new AllinOrder();

        yid = ck.CheckNumber(yid);
        ydid = ck.CheckNumber(ydid);

        string sql = "";

        sql = "SELECT * FROM V_POP_FCL WHERE yunjiaid = " + yid + " ";

        if (ftype == "8")
        {
            sql = "SELECT TOP 1 * FROM V_POP_FCL WHERE yunjiaid = " + yid + " ORDER BY id desc";
            if (ydid != "0")
            {
                sql = "SELECT TOP 1 * FROM V_POP_FCL WHERE id = " + ydid;
            }
        }

        if (ftype == "9")
        {
            sql = "SELECT * FROM V_POP_LCL WHERE yunjiaid = " + yid + " ORDER BY id desc";
            if (ydid != "0")
            {
                sql = "SELECT TOP 1 * FROM V_POP_LCL WHERE id = " + ydid;
            }
        }

        if (ftype == "10")
        {
            sql = "SELECT * FROM V_POP_AIR WHERE yunjiaid = " + yid + " ORDER BY id desc";
            if (ydid != "0")
            {
                sql = "SELECT TOP 1 * FROM V_POP_AIR WHERE id = " + ydid;
            }
        }

        ds = cn.mdb_ds(sql, "yunjia");

        //HttpContext.Current.Response.Write(sql);

        string[] k;
        k = new string[100];
        if (ds.Tables["yunjia"].Rows.Count > 0)
        {
            k[0] = ds.Tables["yunjia"].Rows[0]["yunjiaid"].ToString(); //运价编号
            k[1] = ds.Tables["yunjia"].Rows[0]["id"].ToString(); //运价详情编号
            k[2] = ds.Tables["yunjia"].Rows[0]["hangxianmiaoshu"].ToString(); //航线描述
            k[3] = ds.Tables["yunjia"].Rows[0]["startport"].ToString(); //启运港
            k[4] = ds.Tables["yunjia"].Rows[0]["destport"].ToString(); //目的港
            k[5] = ds.Tables["yunjia"].Rows[0]["postdate"].ToString(); //发布日期
            k[6] = ds.Tables["yunjia"].Rows[0]["enddate"].ToString(); //结束日期
            k[7] = ds.Tables["yunjia"].Rows[0]["title"].ToString(); //运价标题
            k[8] = ds.Tables["yunjia"].Rows[0]["companyname"].ToString(); //公司名称
            k[9] = ds.Tables["yunjia"].Rows[0]["realname"].ToString(); //真实姓名
            k[10] = ds.Tables["yunjia"].Rows[0]["userid"].ToString(); //真实姓名
            k[11] = ds.Tables["yunjia"].Rows[0]["star_allin"].ToString(); //安运通级别
            k[12] = ds.Tables["yunjia"].Rows[0]["star_user"].ToString(); //保障级别
            k[13] = ds.Tables["yunjia"].Rows[0]["assurance"].ToString(); //舱位保证数据
            k[14] = AllinOrder1.GetAllinStar(ds.Tables["yunjia"].Rows[0]["star_allin"].ToString()); //安运通级别标记
            k[15] = AllinOrder1.GetUserStar(ds.Tables["yunjia"].Rows[0]["star_user"].ToString()); //保障级别标记
            k[16] = AllinOrder1.GetAssuranceSpace(ds.Tables["yunjia"].Rows[0]["assurance"].ToString()); //舱位保证标记
            k[17] = AllinOrder1.GetAssurancePrice(ds.Tables["yunjia"].Rows[0]["star_allin"].ToString()); //价格保证标记
            k[18] = "<a href=\"/company/" + SetKey(ds.Tables["yunjia"].Rows[0]["userid"].ToString()) + "/\" target=\"_blank\">" + ds.Tables["yunjia"].Rows[0]["companyname"].ToString() + "</a>"; //公司链接
            k[19] = "<a href=\"/company/" + SetKey(ds.Tables["yunjia"].Rows[0]["userid"].ToString()) + "/\" target=\"_blank\">" + AllinOrder1.GetAllinStar(ds.Tables["yunjia"].Rows[0]["star_allin"].ToString()) + "</a>"; //安运通级别标记(带链接)
            k[20] = "<a href=\"/company/" + SetKey(ds.Tables["yunjia"].Rows[0]["userid"].ToString()) + "/\" target=\"_blank\">" + AllinOrder1.GetUserStar(ds.Tables["yunjia"].Rows[0]["star_user"].ToString()) + "</a>"; //保障级别标记(带链接)

            k[30] = ds.Tables["yunjia"].Rows[0]["price20gp"].ToString(); //20尺柜价格
            k[31] = ds.Tables["yunjia"].Rows[0]["price40gp"].ToString(); //40尺柜价格
            k[32] = ds.Tables["yunjia"].Rows[0]["price40hq"].ToString(); //40尺高柜价格
            k[33] = ds.Tables["yunjia"].Rows[0]["price45hq"].ToString(); //45尺高柜价格
            k[34] = ds.Tables["yunjia"].Rows[0]["shipcompany"].ToString(); //船公司
            k[35] = "<a href=\"/fcl/" + SetKey(ds.Tables["yunjia"].Rows[0]["yunjiaid"].ToString()) + "_" + ds.Tables["yunjia"].Rows[0]["id"].ToString() + ".html\" target=\"_blank\">" + ds.Tables["yunjia"].Rows[0]["title"].ToString() + "</a>"; //运价链接
            k[36] = ds.Tables["yunjia"].Rows[0]["price20gpappend"].ToString();//附加费价格

            k[40] = ds.Tables["yunjia"].Rows[0]["pricegp"].ToString(); //20尺柜价格
            k[41] = ds.Tables["yunjia"].Rows[0]["pricegpv"].ToString(); //40尺柜价格
            k[42] = "<a href=\"/lcl/" + SetKey(ds.Tables["yunjia"].Rows[0]["yunjiaid"].ToString()) + "_" + ds.Tables["yunjia"].Rows[0]["id"].ToString() + ".html\" target=\"_blank\">" + ds.Tables["yunjia"].Rows[0]["title"].ToString() + "</a>"; //运价链接

            k[50] = ds.Tables["yunjia"].Rows[0]["PRICE_M"].ToString(); //20尺柜价格
            k[51] = ds.Tables["yunjia"].Rows[0]["PRICE_N"].ToString(); //40尺柜价格
            k[52] = ds.Tables["yunjia"].Rows[0]["PRICE_P45"].ToString(); //40尺柜价格
            k[53] = ds.Tables["yunjia"].Rows[0]["PRICE_P100"].ToString(); //40尺柜价格
            k[54] = ds.Tables["yunjia"].Rows[0]["PRICE_P300"].ToString(); //40尺柜价格
            k[55] = ds.Tables["yunjia"].Rows[0]["PRICE_P500"].ToString(); //40尺柜价格
            k[56] = ds.Tables["yunjia"].Rows[0]["PRICE_P1000"].ToString(); //40尺柜价格
            k[57] = "<a href=\"/air/" + SetKey(ds.Tables["yunjia"].Rows[0]["yunjiaid"].ToString()) + "_" + ds.Tables["yunjia"].Rows[0]["id"].ToString() + ".html\" target=\"_blank\">" + ds.Tables["yunjia"].Rows[0]["title"].ToString() + "</a>"; //运价链接

        }
        return k;
    }