protected void GetCuntryDocu() { CuntryDocumenttbl ls = new CuntryDocumenttbl(); List <CuntryDocumenttbl> lst = new List <CuntryDocumenttbl>(); lst = objCuntryDocuBL.GetAllCuntryDocu(ls).ToList(); gdvCDocument.DataSource = lst; gdvCDocument.DataBind(); btnUpdate.Visible = false; }
protected void GetCountryById(int id) { CuntryDocumenttbl cd = new CuntryDocumenttbl(); cd.CountryID = id; List <CuntryDocumenttbl> lst = new List <CuntryDocumenttbl>(); lst = objCuntryDocuBL.GetCountryByID(cd).ToList(); foreach (var el in lst) { hdnCDocumentId.Value = el.CDocumentId.ToString(); DDlCountry.SelectedValue = el.CountryID.ToString(); txtDName.Text = el.DocumentName; } }
protected void btnUpdate_Click(object sender, EventArgs e) { CuntryDocumenttbl st = new CuntryDocumenttbl(); st.CDocumentId = Convert.ToInt32(hdnCDocumentId.Value); st.DocumentName = txtDName.Text; st.CountryID = Convert.ToInt32(DDlCountry.SelectedValue); st.IsActive = 1; st.UpdatedBy = 1; st.UpdatedDate = DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss"); List <CuntryDocumenttbl> lst = new List <CuntryDocumenttbl>(); lst = objCuntryDocuBL.UpdateCDocument(st).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Document Updated Successfully');", true); Reset(); GetCuntryDocu(); btnUpdate.Visible = false; btnSave.Visible = true; }
protected void lbtnActive_Click(object sender, EventArgs e) { LinkButton lbtn = (LinkButton)sender; GridViewRow gvr = (GridViewRow)lbtn.NamingContainer; var val = gvr.DataItemIndex; var status = gvr.Cells[3].Text; CuntryDocumenttbl st = new CuntryDocumenttbl(); st.CDocumentId = Convert.ToInt32(gvr.Cells[0].Text); if (status == "Active") { st.IsActive = 0; } else if (status == "InActive") { st.IsActive = 1; } objCuntryDocuBL.UpdateCDocumentIsActive(st); GetCuntryDocu(); }
protected void insertCountryDocu() { CuntryDocumenttbl st = new CuntryDocumenttbl(); st.DocumentName = txtDName.Text; st.CountryID = Convert.ToInt32(DDlCountry.SelectedValue); st.IsActive = 1; st.CreatedBy = 1; st.CreatedDate = DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss"); st.UpdatedBy = 1; st.UpdatedDate = DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss"); List <CuntryDocumenttbl> lst = new List <CuntryDocumenttbl>(); lst = objCuntryDocuBL.SaveCDocument(st).ToList(); if (lst[0].Message == "Success") { ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Document Saved Successfully');", true); } Reset(); btnSave.Visible = true; GetCuntryDocu(); }
protected void lbtnEdit_Click(object sender, EventArgs e) { LinkButton lbtn = (LinkButton)sender; GridViewRow gvr = (GridViewRow)lbtn.NamingContainer; var val = gvr.DataItemIndex; var id = Convert.ToInt32(gvr.Cells[0].Text); CuntryDocumenttbl st = new CuntryDocumenttbl(); st.CDocumentId = id; List <CuntryDocumenttbl> lst = new List <CuntryDocumenttbl>(); lst = objCuntryDocuBL.GetCDocumentById(st).ToList(); foreach (var el in lst) { hdnCDocumentId.Value = el.CDocumentId.ToString(); DDlCountry.SelectedValue = el.CountryID.ToString(); txtDName.Text = el.DocumentName; } btnSave.Visible = false; btnUpdate.Visible = true; }
public IEnumerable <CuntryDocumenttbl> GetStateWithCountry(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(9, st)); }
public IEnumerable <CuntryDocumenttbl> GetCDocumentIsActive(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(7, st)); }
public IEnumerable <CuntryDocumenttbl> GetCountryByID(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(8, st)); }
public IEnumerable <CuntryDocumenttbl> UpdateCDocumentIsActive(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(6, st)); }
public IEnumerable <CuntryDocumenttbl> DeleteCDocument(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(5, st)); }
public IEnumerable <CuntryDocumenttbl> SaveCDocument(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(3, st)); }
public IEnumerable <CuntryDocumenttbl> GetCDocumentById(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(2, st)); }
public IEnumerable <CuntryDocumenttbl> GetAllCuntryDocu(CuntryDocumenttbl st) { return(objCuntryDocuDA.CuntryDocuAll(1, st)); }