private void FillAlbumName() { try { tbl_AlbumMasterProp Objtbl_AlbumMasterProp = new tbl_AlbumMasterProp(); Objtbl_AlbumMasterProp.AlbumCode = 0; tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL(); DataSet dsData = Objtbl_AlbumMasterBAL.SelectCombo_Data(); DataRow drNew = dsData.Tables[0].NewRow(); drNew["AlbumName"] = "--- Select Any ---"; drNew["AlbumCode"] = 0; dsData.Tables[0].Rows.InsertAt(drNew, 0); ddlAlbumName.DataSource = dsData.Tables[0]; ddlAlbumName.DataTextField = "AlbumName"; ddlAlbumName.DataValueField = "AlbumCode"; ddlAlbumName.DataBind(); } catch (Exception ex) { throw ex; } }
private void DeleteData(int AlbumCode) { try { tbl_AlbumMasterProp Objtbl_AlbumMasterProp = new tbl_AlbumMasterProp(); Objtbl_AlbumMasterProp.AlbumCode = AlbumCode; tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL(); Objtbl_AlbumMasterBAL.Delete_Data(Objtbl_AlbumMasterProp); FillData(); } catch (Exception ex) { throw ex; } }
private void FillAlbumList() { try { tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL(); DataSet dsData = Objtbl_AlbumMasterBAL.SelectCombo_Data(); rptPhotoAlbum.DataSource = dsData.Tables[0]; rptPhotoAlbum.DataBind(); if (dsData.Tables[0].Rows.Count > 0) { FillAlbumImages(Convert.ToInt32(dsData.Tables[0].Rows[0]["AlbumCode"])); } } catch { } }
private void EditData(int AlbumCode) { try { tbl_AlbumMasterProp Objtbl_AlbumMasterProp = new tbl_AlbumMasterProp(); Objtbl_AlbumMasterProp.AlbumCode = AlbumCode; int PageCount = 0; tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL(); DataSet dsData = Objtbl_AlbumMasterBAL.Select_Data(Objtbl_AlbumMasterProp, ref PageCount); txtAlbumName.Text = Convert.ToString(dsData.Tables[0].Rows[0]["AlbumName"]); ViewState["EditCode"] = AlbumCode; } catch (Exception ex) { throw ex; } }
protected void imgbtnSave_Click(object sender, ImageClickEventArgs e) { try { tbl_AlbumMasterProp Objtbl_AlbumMasterProp = new tbl_AlbumMasterProp(); Objtbl_AlbumMasterProp.AlbumCode = Convert.ToInt32(ViewState["EditCode"]); Objtbl_AlbumMasterProp.AlbumName = txtAlbumName.Text; tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL(); Objtbl_AlbumMasterBAL.InsertUpdate_Data(Objtbl_AlbumMasterProp); ShowGuidMessage(1, null); mdlPopupNewEntry.Hide(); FillData(); } catch (Exception ex) { ShowGuidMessage(0, ex); //MessageBox.Show(ex.Message); } }
private void FillData() { try { int PageCount = 0; tbl_AlbumMasterProp Objtbl_AlbumMasterProp = new tbl_AlbumMasterProp(); Objtbl_AlbumMasterProp.AlbumCode = 0; Objtbl_AlbumMasterProp.PageNo = Convert.ToInt32(txtCurPage.Text); Objtbl_AlbumMasterProp.RecordCount = Convert.ToInt32(20); tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL(); DataSet dsData = Objtbl_AlbumMasterBAL.Select_Data(Objtbl_AlbumMasterProp, ref PageCount); lblTotalPage.Text = Convert.ToString(PageCount); grdData.DataSource = dsData.Tables[0]; grdData.DataBind(); } catch (Exception ex) { throw ex; } }