public void GetData()
        {
            string ID = Request.QueryString["rowid"];

            NineOrchidBLL.GedungBLL bll = new NineOrchidBLL.GedungBLL();
            SortedList sl = new SortedList();

            sl.Add("@idxGedung-int", ID);
            DataTable dt = bll.GetContent(sl);

            nmGedung.Text  = dt.Rows[0]["gedung_nm"].ToString();
            jmlLantai.Text = dt.Rows[0]["jml_lantai"].ToString();
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string ID = Request.QueryString["rowid"];

            NineOrchidBLL.GedungBLL bll = new NineOrchidBLL.GedungBLL();
            SortedList sl = new SortedList();

            sl.Add("@idxGedung-int", ID);
            sl.Add("@jml_lantai-varchar-2", jmlLantai.Text);
            sl.Add("@gedung_nm-varchar-20", nmGedung.Text);
            bll.Update(sl);
            Response.Redirect("~/Pages/Project/MasterGedung.aspx");
        }
Пример #3
0
        public void getData(string action)
        {
            string ID = Request.QueryString["rowid"];

            if (action == "1")
            {
                NineOrchidBLL.GedungBLL bll = new NineOrchidBLL.GedungBLL();
                SortedList sl = new SortedList();
                sl.Add("@idxGedung-int", ID);
                DataTable dt = bll.GetContent(sl);
                string    x  = dt.Rows[0]["gedung_nm"].ToString();
                lblFileName.Text = x;
            }
            else if (action == "2")
            {
                NineOrchidBLL.KamarBLL bll = new NineOrchidBLL.KamarBLL();
                SortedList             sl  = new SortedList();
                sl.Add("@idxKamar-varchar-10", ID);
                DataTable dt = bll.GetContent(sl);
                string    x  = dt.Rows[0]["idxKamar"].ToString();
                lblFileName.Text = x;
            }
            else if (action == "3")
            {
                NineOrchidBLL.PerusahaanBLL bll = new NineOrchidBLL.PerusahaanBLL();
                SortedList sl = new SortedList();
                sl.Add("@idxPerusahaan-int", ID);
                DataTable dt = bll.GetContent(sl);
                string    x  = dt.Rows[0]["idxPerusahaan"].ToString();
                lblFileName.Text = x;
            }
            else if (action == "5")
            {
                NineOrchidBLL.PenghuniBLL bll = new NineOrchidBLL.PenghuniBLL();
                SortedList sl = new SortedList();
                sl.Add("@idxPenghuni-int", ID);
                DataTable dt = bll.GetContent(sl);
                string    x  = dt.Rows[0]["idxPenghuni"].ToString();
                lblFileName.Text = x;
            }
            else
            {
                lblFileName.Text = "";
            }
        }
Пример #4
0
 public void delete(string action)
 {
     if (action == "1")
     {
         string ID = Request.QueryString["rowid"];
         NineOrchidBLL.GedungBLL bll = new NineOrchidBLL.GedungBLL();
         SortedList sl = new SortedList();
         sl.Add("@idxGedung-int", ID);
         bll.Delete(sl);
     }
     else if (action == "2")
     {
         string ID = Request.QueryString["rowid"];
         NineOrchidBLL.KamarBLL bll = new NineOrchidBLL.KamarBLL();
         SortedList             sl  = new SortedList();
         sl.Add("@idxKamar-varchar-10", ID);
         bll.Delete(sl);
     }
     else if (action == "3")
     {
         string ID = Request.QueryString["rowid"];
         NineOrchidBLL.PerusahaanBLL bll = new NineOrchidBLL.PerusahaanBLL();
         SortedList sl = new SortedList();
         sl.Add("@idxPerusahaan-INT", ID);
         bll.Delete(sl);
     }
     else if (action == "4")
     {
         string ID = Request.QueryString["rowid"];
         NineOrchidBLL.KerabatBLL bll = new NineOrchidBLL.KerabatBLL();
         SortedList sl = new SortedList();
         sl.Add("@idxKerabat-INT", ID);
         bll.Delete(sl);
     }
     else if (action == "5")
     {
         string ID = Request.QueryString["rowid"];
         NineOrchidBLL.PenghuniBLL bll = new NineOrchidBLL.PenghuniBLL();
         SortedList sl = new SortedList();
         sl.Add("@idxPenghuni-INT", ID);
         bll.Delete(sl);
     }
 }