public void loadPremiseStatus(int id)
 {
     adminTableAdapters.PremisesStatusTableAdapter pmstatus = new adminTableAdapters.PremisesStatusTableAdapter();
     admin.PremisesStatusDataTable tbl = pmstatus.GetPremisasStatusDetails(id);
     if (tbl.Rows.Count > 0)
     {
         txtdescription.Value = tbl[0].datDescription.ToString();
         this.editskip.Value = "2";
     }
     }
 public void loadPremiseStatus(int id)
 {
     adminTableAdapters.PremisesStatusTableAdapter pmstatus = new adminTableAdapters.PremisesStatusTableAdapter();
     admin.PremisesStatusDataTable tbl = pmstatus.GetPremisasStatusDetails(id);
     if (tbl.Rows.Count > 0)
     {
         txtdescription.Value = tbl[0].datDescription.ToString();
         this.editskip.Value  = "2";
     }
 }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.PremisesStatusTableAdapter pmstatus = new adminTableAdapters.PremisesStatusTableAdapter();
        if (!(type == "update"))
        {
            pmstatus.InsertPremisesStatus(txtdescription.Value);
        }
        else if (type == "update")
        {
            pmstatus.UpdatePremisesStatus(txtdescription.Value.Trim(),
                                          id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "psedit"));
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.PremisesStatusTableAdapter pmstatus = new adminTableAdapters.PremisesStatusTableAdapter();
        if (!(type == "update"))
        {
            pmstatus.InsertPremisesStatus(txtdescription.Value);
          
        }
        else if (type == "update")
        {
           pmstatus.UpdatePremisesStatus(txtdescription.Value.Trim(), 
                               id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "psedit"));
    }