コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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.");
            }
        }
コード例 #3
0
        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.");
            }
        }
コード例 #4
0
        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.");
            }
        }