예제 #1
0
 private void ShowInfo(int CID)
 {
     CHSS.BLL.CCommunityAgency   bll   = new CHSS.BLL.CCommunityAgency();
     CHSS.Model.CCommunityAgency model = bll.GetModel(CID);
     this.txtCID.Text             = model.CID.ToString();
     this.txtCommDescription.Text = model.CommDescription;
     this.txtCommAddDate.Text     = model.CommAddDate;
     this.txtCommName.Text        = model.CommName;
 }
예제 #2
0
파일: Add.aspx.cs 프로젝트: GnohiSiaM/demos
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string CommDescription = this.txtCommDescription.Text;
            string CommAddDate     = this.txtCommAddDate.Text;
            string CommName        = this.txtCommName.Text;
            int    UID             = int.Parse(Session["UID"].ToString());

            CHSS.Model.CCommunityAgency model = new CHSS.Model.CCommunityAgency();
            model.CommDescription = CommDescription;
            model.CommAddDate     = CommAddDate;
            model.CommName        = CommName;
            model.UID             = UID;

            CHSS.BLL.CCommunityAgency bll = new CHSS.BLL.CCommunityAgency();
            bll.Add(model);
            Response.Redirect("Show.aspx?id=" + (bll.GetMaxId() - 1));
        }
예제 #3
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            int    CID             = int.Parse(this.txtCID.Text);
            string CommDescription = this.txtCommDescription.Text;
            string CommAddDate     = this.txtCommAddDate.Text;
            string CommName        = this.txtCommName.Text;
            int    UID             = int.Parse(Session["UID"].ToString());


            CHSS.Model.CCommunityAgency model = new CHSS.Model.CCommunityAgency();
            model.CID             = CID;
            model.CommDescription = CommDescription;
            model.CommAddDate     = CommAddDate;
            model.CommName        = CommName;
            model.UID             = UID;

            CHSS.BLL.CCommunityAgency bll = new CHSS.BLL.CCommunityAgency();
            bll.Update(model);
            Response.Redirect("Show.aspx?id=" + CID);
        }