public void StartBidingOther(int id) { #if DEBUG _log.Debug("id: {0}", id); #endif _catId = id; lbError.Visible = false; try { if (_catId <= 0) { return; } var result = OtherDAL.GetAll(_catId); if (result.Code < 0) { lbError.InnerText = result.ErrorMessage; lbError.Visible = true; return; } _dataSource = result.Data.Tables[0]; grvSubOtherItems.DataSource = result.Data; grvSubOtherItems.DataKeyNames = new string[] { "Id" }; grvSubOtherItems.DataBind(); } catch (Exception ex) { _log.Error(ex.ToString()); lbError.InnerText = ex.Message; lbError.Visible = true; } }
public void StartBindingItems(int otherTypeId, string title) { string tag = __tag + "[StartBindingItems]"; LogHelpers.WriteStatus(tag, "OtherTypeId = " + otherTypeId.ToString(), "Start..."); try { if (otherTypeId <= 0) { return; } lbTitle.Text = title; var result = OtherDAL.GetAll(otherTypeId); if (result.Code < 0) { LogHelpers.WriteError(tag, result.ErrorMessage); return; } lvMainRightLinkItems.DataSource = result.Data; lvMainRightLinkItems.DataKeyNames = new string[] { "Id", "Name_VN", "Name_EN" }; lvMainRightLinkItems.DataBind(); } catch (Exception ex) { LogHelpers.WriteException(tag, ex.ToString()); } finally { LogHelpers.WriteStatus(tag, "End."); } }
public void StartBidingOtherType(int id) { string tag = __tag + "[StartBidingOtherType]"; LogHelpers.WriteStatus(tag, "Start..."); lbError.Visible = false; try { ResultBOL <DataSet> result = null; if (id <= 0) { result = OtherTypeDAL.GetAll(); } else { result = OtherDAL.GetAll(id); } if (result.Code < 0) { lbError.InnerText = result.ErrorMessage; lbError.Visible = true; return; } _dataSource = result.Data.Tables[0]; grvOtherItems.DataSource = result.Data; grvOtherItems.DataKeyNames = new string[] { "Id" }; grvOtherItems.DataBind(); } catch (Exception ex) { LogHelpers.WriteException(tag, ex.ToString()); lbError.InnerText = ex.Message; lbError.Visible = true; } finally { LogHelpers.WriteStatus(tag, "End."); } }
public void StartBidingOther(int catId) { _catId = catId; string tag = __tag + "[StartBidingOther]"; LogHelpers.WriteStatus(tag, "CatId: " + _catId.ToString(), "Start..."); lbError.Visible = false; try { if (_catId <= 0) { return; } var result = OtherDAL.GetAll(_catId); if (result.Code < 0) { lbError.InnerText = result.ErrorMessage; lbError.Visible = true; return; } _dataSource = result.Data.Tables[0]; grvSubOtherItems.DataSource = result.Data; grvSubOtherItems.DataKeyNames = new string[] { "Id" }; grvSubOtherItems.DataBind(); } catch (Exception ex) { LogHelpers.WriteException(tag, ex.ToString()); lbError.InnerText = ex.Message; lbError.Visible = true; } finally { LogHelpers.WriteStatus(tag, "End."); } }