Esempio n. 1
0
        protected void btnok_Click(object sender, EventArgs e)
        {
            Maticsoft.BLL.FuWuInfo   fuwubll   = new Maticsoft.BLL.FuWuInfo();
            Maticsoft.Model.FuWuInfo fuwumodel = fuwubll.GetModel(1);
            if (txtfuwuTitle.Text.Trim() == "")
            {
                lblfuwutitle.Text = "请填写服务标题!";
                return;
            }
            fuwumodel.fuwuTitle = txtfuwuTitle.Text.Trim();
            lblfuwutitle.Text   = "";
            if (txtFatime.Text.Trim() == "")
            {
                lblfuwutime.Text = "请填写服务发布时间!";
                return;
            }
            fuwumodel.Fatime      = Convert.ToDateTime(txtFatime.Text.Trim());
            lblfuwutime.Text      = "";
            fuwumodel.Fuwucontent = txtFuwucontent.Text.Trim();

            fuwumodel.FuwuTypeID = DrpFuwuType.SelectedIndex + 1;
            tu.Visible           = true;
            fuwumodel.ImageURL   = Image1.ImageUrl;
            if (txtWrite.Text.Trim() == "")
            {
                lblfuwuwrite.Text = "请填写发布人!";
                return;
            }
            fuwumodel.Write   = txtWrite.Text.Trim();
            lblfuwuwrite.Text = "";
            fuwubll.Update(fuwumodel);
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('信息添加成功!')</script>");
            bind();
        }
Esempio n. 2
0
        protected void datading_DeleteCommand(object source, DataListCommandEventArgs e)
        {
            int index = int.Parse(datafuwu.DataKeys[e.Item.ItemIndex].ToString());

            Maticsoft.BLL.FuWuInfo fuwubll = new Maticsoft.BLL.FuWuInfo();
            fuwubll.Delete(index);
            bind();
        }
Esempio n. 3
0
        protected void datading_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            int index = int.Parse(datafuwu.DataKeys[e.Item.ItemIndex].ToString());

            Maticsoft.BLL.FuWuInfo       fuwubll   = new Maticsoft.BLL.FuWuInfo();
            Maticsoft.Model.FuWuInfo     fuwumodel = fuwubll.GetModel(index);
            Maticsoft.BLL.FuWuTypeInfo   typebll   = new Maticsoft.BLL.FuWuTypeInfo();
            Maticsoft.Model.FuWuTypeInfo typemodel = typebll.GetModel(int.Parse(fuwumodel.FuwuTypeID.ToString()));
            ((Label)e.Item.FindControl("lnltype")).Text = typemodel.FuwuTypeName;
        }
Esempio n. 4
0
        private void bind()
        {
            Maticsoft.BLL.FuWuInfo   fuwubll   = new Maticsoft.BLL.FuWuInfo();
            Maticsoft.Model.FuWuInfo fuwumodel = fuwubll.GetModel(1);
            DataSet ds = fuwubll.GetAllList();

            datafuwu.DataSource   = ds;
            datafuwu.DataKeyField = "fuwuID";
            datafuwu.DataBind();
        }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Maticsoft.BLL.FuWuInfo fuwubll = new Maticsoft.BLL.FuWuInfo();
         DataSet fuwuds = fuwubll.GetList(6, "", "Fatime desc");
         datafuwu.DataSource = fuwuds;
         datafuwu.DataBind();
         bind();
     }
 }
Esempio n. 6
0
 private void ShowInfo(int fuwuID)
 {
     Maticsoft.BLL.FuWuInfo   bll   = new Maticsoft.BLL.FuWuInfo();
     Maticsoft.Model.FuWuInfo model = bll.GetModel(fuwuID);
     this.lblfuwuID.Text      = model.fuwuID.ToString();
     this.lblfuwuTitle.Text   = model.fuwuTitle;
     this.lblFatime.Text      = model.Fatime.ToString();
     this.lblFuwuTypeID.Text  = model.FuwuTypeID.ToString();
     this.lblWrite.Text       = model.Write;
     this.lblFuwucontent.Text = model.Fuwucontent;
 }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Maticsoft.BLL.FuWuInfo   fuwubll   = new Maticsoft.BLL.FuWuInfo();
         Maticsoft.Model.FuWuInfo fuwumodel = fuwubll.GetModel(1);
         DataSet ds = fuwubll.GetAllList();
         dalistfuwu.DataSource = ds;
         dalistfuwu.DataBind();
     }
 }
Esempio n. 8
0
 private void bind(int fuwuID)
 {
     Maticsoft.BLL.FuWuInfo       fuwubll   = new Maticsoft.BLL.FuWuInfo();
     Maticsoft.Model.FuWuInfo     fuwumodel = fuwubll.GetModel(fuwuID);
     Maticsoft.BLL.FuWuTypeInfo   typebll   = new Maticsoft.BLL.FuWuTypeInfo();
     Maticsoft.Model.FuWuTypeInfo typemodel = typebll.GetModel(int.Parse(fuwumodel.FuwuTypeID.ToString()));
     lblFatime.Text       = Convert.ToDateTime(fuwumodel.Fatime.ToString()).ToString("yyyy-MM-dd");
     lblFuwucontent.Text  = fuwumodel.Fuwucontent;
     lblWrite.Text        = fuwumodel.Write;
     lblFuwuTypeName.Text = typemodel.FuwuTypeName;
     lbltitle.Text        = fuwumodel.fuwuTitle;
 }
Esempio n. 9
0
        private void bind()
        {
            int fuwuid = int.Parse(Request.QueryString["fuwuID"].ToString());

            Maticsoft.BLL.FuWuInfo   fuwubll   = new Maticsoft.BLL.FuWuInfo();
            Maticsoft.Model.FuWuInfo fuwumodel = fuwubll.GetModel(fuwuid);
            txtFatime.Text            = Convert.ToDateTime(fuwumodel.Fatime.ToString()).ToString("yyyy-MM-dd");
            Image1.ImageUrl           = fuwumodel.ImageURL;
            txtFuwucontent.Text       = fuwumodel.Fuwucontent;
            txtfuwuTitle.Text         = fuwumodel.fuwuTitle;
            txtWrite.Text             = fuwumodel.Write;
            DrpFuwuType.SelectedValue = fuwumodel.FuwuTypeID.ToString();
        }
Esempio n. 10
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtfuwuTitle.Text.Trim().Length == 0)
            {
                strErr += "fuwuTitle不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtFatime.Text))
            {
                strErr += "Fatime格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtFuwuTypeID.Text))
            {
                strErr += "FuwuTypeID格式错误!\\n";
            }
            if (this.txtWrite.Text.Trim().Length == 0)
            {
                strErr += "Write不能为空!\\n";
            }
            if (this.txtFuwucontent.Text.Trim().Length == 0)
            {
                strErr += "Fuwucontent不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      fuwuID      = int.Parse(this.lblfuwuID.Text);
            string   fuwuTitle   = this.txtfuwuTitle.Text;
            DateTime Fatime      = DateTime.Parse(this.txtFatime.Text);
            int      FuwuTypeID  = int.Parse(this.txtFuwuTypeID.Text);
            string   Write       = this.txtWrite.Text;
            string   Fuwucontent = this.txtFuwucontent.Text;


            Maticsoft.Model.FuWuInfo model = new Maticsoft.Model.FuWuInfo();
            model.fuwuID      = fuwuID;
            model.fuwuTitle   = fuwuTitle;
            model.Fatime      = Fatime;
            model.FuwuTypeID  = FuwuTypeID;
            model.Write       = Write;
            model.Fuwucontent = Fuwucontent;

            Maticsoft.BLL.FuWuInfo bll = new Maticsoft.BLL.FuWuInfo();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Esempio n. 11
0
        private void bind()
        {
            Maticsoft.BLL.NewsInfo newbll = new Maticsoft.BLL.NewsInfo();
            DataSet newds = newbll.GetList(7, "", " Fatime desc ");

            datanews.DataSource = newds;
            datanews.DataBind();
            Maticsoft.BLL.NicheInfo nichebll = new Maticsoft.BLL.NicheInfo();
            DataSet nicheds = nichebll.GetList(6, "", "Fatime desc");

            dataniche.DataSource = nicheds;
            dataniche.DataBind();
            Maticsoft.BLL.Product probll = new Maticsoft.BLL.Product();
            DataSet prods = probll.GetList(4, "", " Fatime desc");

            datapro.DataSource = prods;
            datapro.DataBind();
            Maticsoft.BLL.WeiLanInfo weilanbll = new Maticsoft.BLL.WeiLanInfo();
            DataSet weilands = weilanbll.GetList(6, "", " Fatime desc ");

            dataweilan.DataSource = weilands;
            dataweilan.DataBind();
            DataSet toujiands = probll.GetList(4, " Toujian=1 ", "  Fatime desc");

            datatoujian.DataSource = toujiands;
            datatoujian.DataBind();
            Maticsoft.BLL.ZiXunInfo zixunbll = new Maticsoft.BLL.ZiXunInfo();
            DataSet zixunds = zixunbll.GetList(6, "ZiXundaan is not null", " zixuntime desc ");

            dataxiangmo.DataSource = zixunds;
            dataxiangmo.DataBind();
            Maticsoft.BLL.JiShuInfo jishubll = new Maticsoft.BLL.JiShuInfo();
            DataSet jishuds = jishubll.GetList(6, "", " Fatime desc ");

            datajishu.DataSource = jishuds;
            datajishu.DataBind();
            Maticsoft.BLL.FuWuInfo fuwubll = new Maticsoft.BLL.FuWuInfo();
            DataSet fuwuds = fuwubll.GetList(6, "", "  Fatime desc ");

            datafuwu.DataSource = fuwuds;
            datafuwu.DataBind();
        }
Esempio n. 12
0
        private void bind()
        {
            int fuwuid = int.Parse(Request.QueryString["fuwuID"].ToString());

            Maticsoft.BLL.FuWuInfo     fuwubll     = new Maticsoft.BLL.FuWuInfo();
            Maticsoft.Model.FuWuInfo   fuwumodel   = fuwubll.GetModel(fuwuid);
            Maticsoft.BLL.FuWuTypeInfo fuwutypebll = new Maticsoft.BLL.FuWuTypeInfo();
            lblfaren.Text  = fuwumodel.Write;
            lblfatime.Text = Convert.ToDateTime(fuwumodel.Fatime.ToString()).ToString("yyyy-MM-dd");
            lbltitle.Text  = fuwumodel.fuwuTitle;
            string fuwutype = fuwutypebll.GetModel(Convert.ToInt32(fuwumodel.FuwuTypeID.ToString())).ToString();

            lbltype.Text = fuwutype;
            if (fuwumodel.ImageURL == "")
            {
                tu.Visible = false;
            }
            else
            {
                tu.Visible      = true;
                Image1.ImageUrl = fuwumodel.ImageURL;
            }
        }