Пример #1
0
        //public int accountlevel = 0;//账户级别:0开户账户;1添加账户
        protected void Page_Load(object sender, EventArgs e)
        {
            //int accountid = Request["accountid"].ConvertTo<int>(0);
            //Agent_regiinfo m_account = AgentCompanyData.GetAgentAccountByid(accountid);
            //if (m_account == null)//没有分销账户直接退出
            //{
            //    Response.Redirect("login.aspx");
            //}
            //accountlevel = m_account.AccountLevel;

            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = Int32.Parse(Session["Agentid"].ToString());
                Account = Session["Account"].ToString();


                //查询此分销是否为开户账户如果不是则返回登录页,此页面只有开户账户才能管理
                var agentdate = AgentCompanyData.GetAgentByid(Agentid);
                if (agentdate == null)
                {
                    Response.Redirect("/Agent/login.aspx");
                }
                if (agentdate.AccountLevel != 0)
                {
                    Response.Redirect("/Agent/login.aspx");
                }
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Agentid"] != null)
            {
                try
                {
                    //账户信息
                    Agentid = Int32.Parse(Session["Agentid"].ToString());
                    Account = Session["Account"].ToString();

                    if (Agentid != 0)
                    {
                        var agentdata = AgentCompanyData.GetAgentByid(Agentid);
                        if (agentdata != null)
                        {
                            Agentsort = agentdata.Agentsort;
                        }
                    }
                }
                catch
                {
                    Response.Redirect("/Agent/login.aspx");
                }
            }
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Agentid"] != null)
     {
         //账户信息
         var aget = Session["Agentid"].ToString();
         if (aget != "")
         {
             Agentid = Int32.Parse(aget);
             Account = Session["Account"].ToString();
         }
         if (Agentid != 0)
         {
             var agentdata = AgentCompanyData.GetAgentByid(Agentid);
             if (agentdata != null)
             {
                 Agentsort = agentdata.Agentsort;
             }
         }
         //微信渠道
         if (Agentsort == 1)
         {
             Response.Redirect("Agent_Com_list.aspx");
         }
         //项目账户
         if (Agentsort == 2)
         {
             Response.Redirect("Project.aspx");
         }
     }
 }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = Int32.Parse(Session["Agentid"].ToString());

                if (Agentid != 0)
                {
                    var com = B2bCompanyData.GetAllComMsgbyAgentid(Agentid);
                    if (com != null)
                    {
                        //返回登陆成功
                        loginstate = 1;
                    }
                    else
                    {
                        var agentinfo = AgentCompanyData.GetAgentByid(Agentid);
                        if (agentinfo != null)
                        {
                            var mobile = agentinfo.Mobile;
                            phone = agentinfo.Mobile;
                            if (mobile != "")
                            {
                                var com_id = B2bCompanyData.GetAllComMsgbyphone(mobile);
                                if (com_id > 0)
                                {
                                    phonestate = com_id;
                                    var cominfo = B2bCompanyData.GetAllComMsg(com_id);
                                    if (cominfo != null)
                                    {
                                        comname = cominfo.Com_name;
                                    }
                                }
                                else if (com_id < 0)
                                {
                                    phonestate = com_id;
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Agentid"] != null)
     {
         //账户信息
         var aget = Session["Agentid"].ToString();
         if (aget != "")
         {
             Agentid = Int32.Parse(aget);
             Account = Session["Account"].ToString();
         }
         if (Agentid != 0)
         {
             var agentdata = AgentCompanyData.GetAgentByid(Agentid);
             if (agentdata != null)
             {
                 Agentsort = agentdata.Agentsort;
             }
         }
     }
 }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            comaccount = Request["comaccount"].ConvertTo <string>("");
            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = Int32.Parse(Session["Agentid"].ToString());
                Account = Session["Account"].ToString();



                if (Agentid != 0)
                {
                    var agentdata = AgentCompanyData.GetAgentByid(Agentid);
                    if (agentdata != null)
                    {
                        Agentsort = agentdata.Agentsort;
                    }
                }
            }
        }
Пример #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Id = Request["id"].ConvertTo <int>(0);


            //判断登录账户是否为分销开户账户
            if (Session["Agentid"] != null)
            {
                Agentid = Int32.Parse(Session["Agentid"].ToString());
            }

            var agentdate = AgentCompanyData.GetAgentByid(Agentid);

            if (agentdate == null)
            {
                Response.Redirect("/Agent/login.aspx");
            }

            if (agentdate.AccountLevel != 0)
            {
                Response.Redirect("/Agent/login.aspx");
            }
        }
Пример #8
0
        public int Agentsort  = 1;//0为票务分销,1为微站渠道,2为项目商户


        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = Int32.Parse(Session["Agentid"].ToString());


                if (Session["Account"] == null)
                {
                    Response.Redirect("login.aspx");
                }


                account = Session["Account"].ToString();

                if (Agentid != 0)
                {
                    var agentdata = AgentCompanyData.GetAgentByid(Agentid);
                    if (agentdata != null)
                    {
                        Agentsort = agentdata.Agentsort;
                    }
                }

                var agentdate = AgentCompanyData.GetAgentAccountByUid(account, Agentid);
                if (agentdate == null)//没有分销账户直接退出
                {
                    Response.Redirect("login.aspx");
                }
                accountid    = agentdate.Id;
                AccountLevel = agentdate.AccountLevel;
            }
            else
            {
                if (Request.Cookies["Agentid"] != null)
                {
                    string accountmd5   = "";
                    string Account      = "";
                    int    Agentid_temp = int.Parse(Request.Cookies["Agentid"].Value);
                    if (Request.Cookies["AgentKey"] != null)
                    {
                        accountmd5 = Request.Cookies["AgentKey"].Value;
                    }
                    if (Request.Cookies["Account"] != null)
                    {
                        Account = Request.Cookies["Account"].Value;
                    }

                    var agentdata = AgentCompanyData.GetAgentByid(Agentid_temp);
                    if (agentdata != null)
                    {
                        var returnmd5 = EncryptionHelper.ToMD5(Account + "lixh1210" + Agentid_temp, "UTF-8");
                        if (returnmd5 == accountmd5)
                        {
                            Session["Agentid"] = Agentid_temp;
                            Session["Account"] = Account;
                            Response.Redirect(Request.Url.ToString());
                        }
                        else
                        {
                            Response.Redirect("login.aspx");
                        }
                    }
                    else
                    {
                        Response.Redirect("login.aspx");
                    }
                }
                else
                {
                    Response.Redirect("login.aspx");
                }
            }
        }
Пример #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            comid_temp = Request["comid"].ConvertTo <int>(0);
            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = (Session["Agentid"].ToString()).ConvertTo <int>(0);


                B2b_company companyinfo = B2bCompanyData.GetAllComMsg(comid_temp);
                if (companyinfo != null)
                {
                    company = companyinfo.Com_name;
                }


                if (Session["Account"] == null)
                {
                    Response.Redirect("login.aspx");
                }


                account = Session["Account"].ToString();

                if (Agentid != 0)
                {
                    var agentdata = AgentCompanyData.GetAgentByid(Agentid);
                    if (agentdata != null)
                    {
                        Agentsort = agentdata.Agentsort;
                        if (Agentsort == 1)
                        {
                            Response.Redirect("default.aspx");
                        }
                    }
                }

                var agentdate = AgentCompanyData.GetAgentAccountByUid(account, Agentid);
                if (agentdate == null)//没有分销账户直接退出
                {
                    Response.Redirect("login.aspx");
                }

                AccountLevel = agentdate.AccountLevel;
            }
            else
            {
                if (Request.Cookies["Agentid"] != null)
                {
                    string accountmd5   = "";
                    string Account      = "";
                    int    Agentid_temp = (Request.Cookies["Agentid"].Value).ConvertTo <int>(0);
                    if (Request.Cookies["AgentKey"] != null)
                    {
                        accountmd5 = Request.Cookies["AgentKey"].Value;
                    }
                    if (Request.Cookies["Account"] != null)
                    {
                        Account = Request.Cookies["Account"].Value;
                    }

                    var agentdata = AgentCompanyData.GetAgentByid(Agentid_temp);
                    if (agentdata != null)
                    {
                        var returnmd5 = EncryptionHelper.ToMD5(Account + "lixh1210" + Agentid_temp, "UTF-8");
                        if (returnmd5 == accountmd5)
                        {
                            Session["Agentid"] = Agentid_temp;
                            Session["Account"] = Account;
                            Response.Redirect(Request.Url.ToString());
                        }
                        else
                        {
                            Response.Redirect("login.aspx");
                        }
                    }
                    else
                    {
                        Response.Redirect("login.aspx");
                    }
                }
                else
                {
                    Response.Redirect("login.aspx");
                }
            }
        }
Пример #10
0
        //str4=电话,str7=预订热线

        protected void Page_Load(object sender, EventArgs e)
        {
            id = Request["orderid"].ConvertTo <int>(0);

            B2bOrderData orderdata = new B2bOrderData();
            var          orderinfo = orderdata.GetOrderById(id);

            if (orderinfo == null)
            {
                Response.Redirect("Order.aspx");//未查询到订单
                return;
            }
            //订单数量
            ordernum = orderinfo.U_num;
            subtime  = orderinfo.U_subdate;

            B2bEticketData eticketdata = new B2bEticketData();

            //已打印数量
            printnum   = eticketdata.AlreadyPrintNumbyOrderid(id);
            unprintnum = ordernum - printnum;


            B2bComProData prodate = new B2bComProData();
            var           proinfo = prodate.GetProById(orderinfo.Pro_id.ToString());

            if (proinfo != null)
            {
                comid_temp = proinfo.Com_id;
                proname    = proinfo.Pro_name;
                Face_price = proinfo.Face_price;
                pro_end    = proinfo.Pro_end.ToString("yyyy年MM月dd日");
                pro_start  = proinfo.Pro_start.ToString("yyyy年MM月dd日");
                Pro_Remark = "备注: " + proinfo.pro_note;

                B2b_com_projectData projectdate = new B2b_com_projectData();
                var projectinfo = projectdate.GetProject(proinfo.Projectid, proinfo.Com_id);
                if (projectinfo != null)
                {
                    address = "地址:" + projectinfo.Address;
                    mobile  = projectinfo.Mobile;
                    //proname = projectinfo.Projectname + proname;//不增加项目信息
                }

                if (orderinfo.Agentid != 0)
                {
                    var agentinfo = AgentCompanyData.GetAgentByid(orderinfo.Agentid);
                    if (agentinfo != null)
                    {
                        mobile       = agentinfo.Mobile;//读取分销电话
                        agentcompany = agentinfo.Company;
                    }
                }
            }
            B2b_company companyinfo = B2bCompanyData.GetAllComMsg(comid_temp);

            if (companyinfo != null)
            {
                company = companyinfo.Com_name;
            }

            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = Int32.Parse(Session["Agentid"].ToString());
                Account = Session["Account"].ToString();

                if (Agentid != orderinfo.Agentid)
                {
                    //订单与分销不匹配
                    Response.Redirect("order.aspx");
                }


                Agent_company agenginfo = AgentCompanyData.GetAgentWarrant(Agentid, comid_temp);
                if (agenginfo != null)
                {
                    yufukuan     = "您预付款:" + agenginfo.Imprest.ToString("0.00") + " 元";
                    Warrant_type = agenginfo.Warrant_type;
                    if (Warrant_type == 1)
                    {
                        Warrant_type_str = "销售扣款";
                    }
                    if (Warrant_type == 2)
                    {
                        Warrant_type_str = "验证扣款";
                    }
                }
                else
                {
                    Response.Redirect("/Agent/Default.aspx");
                }
            }
        }
Пример #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            comid_temp = Request["comid"].ConvertTo <int>(0);
            DateTime ViewEndtime = DateTime.Now.AddMonths(-1);

            try
            {
                if (Request.Cookies["agentmessage" + comid_temp] != null)
                {
                    ViewEndtime = DateTime.Parse(Request.Cookies["agentmessage" + comid_temp].Value);
                }
            }
            catch {
                ViewEndtime = DateTime.Now.AddMonths(-1);
            }


            if (comid_temp != 0)
            {
                B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid_temp.ToString());
                if (pro != null)
                {
                    if (pro.Smalllogo != null && pro.Smalllogo != "")
                    {
                        comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0));
                    }
                }
            }



            if (Session["Agentid"] != null)
            {
                //账户信息
                Agentid = Int32.Parse(Session["Agentid"].ToString());

                B2b_comagentmessageData messagedata = new B2b_comagentmessageData();
                messagenew = messagedata.AgentMessageNew(Agentid, comid_temp, ViewEndtime);

                B2b_company companyinfo = B2bCompanyData.GetAllComMsg(comid_temp);
                if (companyinfo != null)
                {
                    company = companyinfo.Com_name;
                }


                if (Session["Account"] == null)
                {
                    Response.Redirect("login.aspx");
                }


                account = Session["Account"].ToString();

                if (Agentid != 0)
                {
                    var agentdata = AgentCompanyData.GetAgentByid(Agentid);
                    if (agentdata != null)
                    {
                        Agentsort    = agentdata.Agentsort;
                        AgentCompany = agentdata.Company;
                    }
                }

                var agentdate = AgentCompanyData.GetAgentAccountByUid(account, Agentid);
                if (agentdate == null)//没有分销账户直接退出
                {
                    Response.Redirect("login.aspx");
                }
                accountid    = agentdate.Id;
                AccountLevel = agentdate.AccountLevel;
            }
            else
            {
                if (Request.Cookies["Agentid"] != null)
                {
                    string accountmd5   = "";
                    string Account      = "";
                    int    Agentid_temp = int.Parse(Request.Cookies["Agentid"].Value);
                    if (Request.Cookies["AgentKey"] != null)
                    {
                        accountmd5 = Request.Cookies["AgentKey"].Value;
                    }
                    if (Request.Cookies["Account"] != null)
                    {
                        Account = Request.Cookies["Account"].Value;
                    }

                    var agentdata = AgentCompanyData.GetAgentByid(Agentid_temp);
                    if (agentdata != null)
                    {
                        var returnmd5 = EncryptionHelper.ToMD5(Account + "lixh1210" + Agentid_temp, "UTF-8");
                        if (returnmd5 == accountmd5)
                        {
                            Session["Agentid"] = Agentid_temp;
                            Session["Account"] = Account;
                            Response.Redirect(Request.Url.ToString());
                        }
                        else
                        {
                            Response.Redirect("login.aspx");
                        }
                    }
                    else
                    {
                        Response.Redirect("login.aspx");
                    }
                }
                else
                {
                    Response.Redirect("login.aspx");
                }
            }
        }