예제 #1
0
파일: login.aspx.cs 프로젝트: no10pc/Light
    private void checklogin(string uname, string psw)
    {
        light.BLL.backtools bll = new light.BLL.backtools();
        light.Model.backtools model = bll.GetModel(uname);
        if (model != null)
        {
            if (model.password == psw)
            {
                UserSessionState uss = UserState;
                uss.IsPassed = true;
                uss.UserName = model.username;
                if (!String.IsNullOrEmpty(ViewState["ReturnUrl"].ToString()))
                {
                    Response.Redirect(ViewState["ReturnUrl"].ToString());
                }
                else
                {
                    Response.Redirect("main.aspx");
                }
            }
            else
            {
                Response.Redirect("login.aspx");

            }
        }
        else
        {
            Response.Redirect("login.aspx");
        }
    }
예제 #2
0
파일: myBase.cs 프로젝트: no10pc/Light
    public string address(int type)
    {
        StringBuilder myStringBuilder = new StringBuilder();
        light.Model.backtools model = new light.BLL.backtools().GetModel("admin");
        switch (type)
        {
            case 1:
                {
                    myStringBuilder.Append("地址:" + model.caddress + "<br>");
                    myStringBuilder.Append("邮编:" + model.postcode + "<br>");
                    myStringBuilder.Append("电话:" + model.phone + "<br>");
                    myStringBuilder.Append("传真:" + model.mobile + "<br>");
                    myStringBuilder.Append("网址:" + model.url + "<br>");
                    myStringBuilder.Append("邮箱:" + model.email);
                    break;
                }
            case 2:
                {
                    myStringBuilder.Append("주소:" + model.kaddress + "<br>");
                    myStringBuilder.Append("우편 번호:" + model.postcode + "<br>");
                    myStringBuilder.Append("전화:" + model.phone + "<br>");
                    myStringBuilder.Append("팩스:" + model.mobile + "<br>");
                    myStringBuilder.Append("웹사이트:" + model.url + "<br>");
                    myStringBuilder.Append("Email:" + model.email);
                    break;
                }
            case 3:
                {
                    myStringBuilder.Append("Address:" + model.eaddress + "<br>");
                    myStringBuilder.Append("Post:" + model.postcode + "<br>");
                    myStringBuilder.Append("Phone:" + model.phone + "<br>");
                    myStringBuilder.Append("Email:" + model.mobile + "<br>");
                    myStringBuilder.Append("URL:" + model.url + "<br>");
                    myStringBuilder.Append("Email:" + model.email);
                    break;
                }

            default:
                {
                    myStringBuilder.Append("地址:" + model.caddress + "<br>");
                    myStringBuilder.Append("邮编:" + model.postcode + "<br>");
                    myStringBuilder.Append("电话:" + model.phone + "<br>");
                    myStringBuilder.Append("传真:" + model.mobile + "<br>");
                    myStringBuilder.Append("网址:" + model.url + "<br>");
                    myStringBuilder.Append("邮箱:" + model.email);
                    break;
                }
        }
        return myStringBuilder.ToString();
    }
예제 #3
0
파일: main.aspx.cs 프로젝트: no10pc/Light
 private void doPost()
 {
     light.BLL.backtools bll = new light.BLL.backtools();
     model = bll.GetModel(UserState.UserName);
     int typeid = int.Parse(Request["typeid"].ToString());
     switch (typeid)
     {
         case 1:
             {
                 model.csitename = Request["csitename"];
                 model.caddress = Request["caddress"];
                 model.ccopyright = Request["ccopyright"];
                 model.csiteinfo = Request["csiteinfo"];
                 break;
             }
         case 2:
             {
                 model.esitename = Request["esitename"];
                 model.eaddress = Request["eaddress"];
                 model.ecopyright = Request["ecopyright"];
                 model.esiteinfo = Request["esiteinfo"];
                 break;
             }
         case 3:
             {
                 model.ksitename = Request["ksitename"];
                 model.kaddress = Request["kaddress"];
                 model.kcopyright = Request["kcopyright"];
                 model.ksiteinfo = Request["ksiteinfo"];
                 break;
             }
     }
     model.phone = Request["phone"];
     model.mobile = Request["mobile"];
     model.fax = Request["fax"];
     model.beian = Request["beian"];
     model.postcode = Request["postcode"];
     model.email = Request["email"];
     model.url = Request["url"];
     bll.Update(model);
     Response.Redirect("main.aspx");
 }
예제 #4
0
파일: main.aspx.cs 프로젝트: no10pc/Light
 private void showinfo()
 {
     light.BLL.backtools bll = new light.BLL.backtools();
     model = bll.GetModel(UserState.UserName);
 }
예제 #5
0
파일: myBase.cs 프로젝트: no10pc/Light
    public PageModel initpage(int type)
    {
        PageModel model = new PageModel();
        light.Model.backtools back = new light.BLL.backtools().GetModel("admin");
        switch (type)
        {
            case 1:
                model._企业名称 = back.csitename;
                model._产品分类 = "产品分类";
                model._公司简介 = "公司简介";
                model._联系我们 = "联系我们";
                model._企业新闻 = "企业新闻";
                model._新闻关注 = "新闻关注";
                model._产品展示 = "产品展示";
                model._企业介绍 = "企业介绍";
                model._新闻分类 = "新闻分类";
                model._资质荣誉 = "资质荣誉";
                model._详细信息 = "详细信息";
                break;
            case 2:

                model._企业名称 = back.ksitename;
                model._产品分类 = "제품 범주";
                model._公司简介 = "회사 소개";
                model._联系我们 = "고객 문의";
                model._企业新闻 = "기업 뉴스";
                model._新闻关注 = "뉴스보기";
                model._产品展示 = "제품 정보";
                model._企业介绍 = "회사 소개";
                model._新闻分类 = "카테고리";
                model._资质荣誉 = "영예로운";
                model._详细信息 = "상세한";
                break;
            case 3:
                model._企业名称 = back.csitename;
                model._产品分类 = "Product Category";
                model._公司简介 = "Company Profile";
                model._联系我们 = "Contact Us";
                model._企业新闻 = "Company News";
                model._新闻关注 = "News Watch";
                model._产品展示 = "Products";
                model._企业介绍 = "Introduction";
                model._新闻分类 = "News Category";
                model._资质荣誉 = "Honors";
                model._详细信息 = "Description";
                break;

        }
        return model;
    }
예제 #6
0
파일: myBase.cs 프로젝트: no10pc/Light
 public string getCompanyInfi(int type)
 {
     string result = string.Empty;
     light.Model.backtools model = new light.BLL.backtools().GetModel("admin");
     if (type == 2)
         result = model.ksiteinfo;
     else if (type == 3)
         result = model.esiteinfo;
     else
         result = model.csiteinfo;
     return result;
 }