//=================================================================================================
        public void Upd_Disable(HttpContext context)
        {
            int ret = -1;
            String jSonString = "";
            try
            {
                CategoryLevel1BO aCategoryLevel1BO = new CategoryLevel1BO();
                List<CategoryLevel1> listCategoryLevel1 = new List<CategoryLevel1>();
                string Code = aCategoryLevel1BO.Sel_ByID(int.Parse(context.Request.QueryString["IDCategoryLevel1"])).Code;

                for (int i = 0; i < listCategoryLevel1.Count; i++)
                {
                    listCategoryLevel1[i].Disable = true;
                    ret = aCategoryLevel1BO.Upd(listCategoryLevel1[i]);
                }

                if (ret != 0)
                {
                    jSonString = "{\"status\":\"error|" + ret.ToString() + "\"}";

                }

                if (ret == 0)
                { jSonString = "{\"status\": \"success\"}"; }
            }
            catch (Exception ex)
            {
                jSonString = "{\"status\":\"error\" ,\"message\":\"" + ex.Message.ToString() + "\"}";
            }
            finally
            {
                context.Response.Write(jSonString);
            }
        }
        public void Upd_ByCode(HttpContext context, int NUM_LANG)
        {
            int ret = -1;
            String jSonString = "";
            try
            {
                if (NUM_LANG < 1)
                {
                    NUM_LANG = 1;
                }
                List<CategoryLevel1> aListCategoryLevel1 = new List<CategoryLevel1>();
                CategoryLevel1BO aCategoryLevel1BO = new CategoryLevel1BO();
                String Code = context.Request.Form["txtCode"];

                aListCategoryLevel1 = aCategoryLevel1BO.Sel_ByCode(Code);
                int LoopUpdate = 0;

                if (aListCategoryLevel1.Count <= NUM_LANG)
                {
                    LoopUpdate = aListCategoryLevel1.Count;
                    for (int i = 0; i < LoopUpdate; i++)
                    {

                        aListCategoryLevel1[i].ID = aListCategoryLevel1[i].ID;
                        aListCategoryLevel1[i].Code = aListCategoryLevel1[i].Code;
                        aListCategoryLevel1[i].IDLang = aListCategoryLevel1[i].IDLang;
                        aListCategoryLevel1[i].Type = !String.IsNullOrEmpty(context.Request.Form["cbbType"]) ? Convert.ToInt32(context.Request.Form["cbbType"]) : aListCategoryLevel1[i].Type;
                        aListCategoryLevel1[i].ViewCount = !String.IsNullOrEmpty(context.Request.Form["txtViewCount"]) ? Convert.ToInt64(context.Request.Form["txtViewCount"]) : 0;
                        aListCategoryLevel1[i].Status = !String.IsNullOrEmpty(context.Request.Form["cbbStatus"]) ? Convert.ToInt32(context.Request.Form["cbbStatus"]) : aListCategoryLevel1[i].Status;
                        aListCategoryLevel1[i].Disable = !String.IsNullOrEmpty(context.Request.Form["cbbDisable"]) ? Convert.ToBoolean(context.Request.Form["cbbDisable"]) : aListCategoryLevel1[i].Disable;
                        aListCategoryLevel1[i].Tag = !String.IsNullOrEmpty(context.Request.Form["txtTag"]) ? Convert.ToString(context.Request.Form["txtTag"]) : aListCategoryLevel1[i].Tag;
                        aListCategoryLevel1[i].IDAlbum = !String.IsNullOrEmpty(context.Request.Form["cbbIDAlbum"]) ? Convert.ToInt32(context.Request.Form["cbbIDAlbum"]) : aListCategoryLevel1[i].IDAlbum;
                        aListCategoryLevel1[i].Image = !String.IsNullOrEmpty(context.Request.Form["txtImage_1"]) ? Convert.ToString(context.Request.Form["txtImage_1"]) : "";
                        aListCategoryLevel1[i].Image1 = !String.IsNullOrEmpty(context.Request.Form["txtImage_2"]) ? Convert.ToString(context.Request.Form["txtImage_2"]) : "";
                        aListCategoryLevel1[i].Image2 = !String.IsNullOrEmpty(context.Request.Form["txtImage_3"]) ? Convert.ToString(context.Request.Form["txtImage_3"]) : "";
                        aListCategoryLevel1[i].Image3 = !String.IsNullOrEmpty(context.Request.Form["txtImage_4"]) ? Convert.ToString(context.Request.Form["txtImage_4"]) : "";

                        aListCategoryLevel1[i].CategoryNameLevel1 = !String.IsNullOrEmpty(context.Request.Form["txtCategoryNameLevel1_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtCategoryNameLevel1_Lang" + (i + 1)]) : aListCategoryLevel1[i].CategoryNameLevel1;
                        aListCategoryLevel1[i].Note = !String.IsNullOrEmpty(context.Request.Form["txtNote_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtNote_Lang" + (i + 1)]) : aListCategoryLevel1[i].Note;
                        aListCategoryLevel1[i].Intro = !String.IsNullOrEmpty(context.Request.Form["txtIntro_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtIntro_Lang" + (i + 1)]) : aListCategoryLevel1[i].Intro;
                        aListCategoryLevel1[i].Info = !String.IsNullOrEmpty(context.Request.Form["txtInfo_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtInfo_Lang" + (i + 1)]) : aListCategoryLevel1[i].Info;

                        ret = aCategoryLevel1BO.Upd(aListCategoryLevel1);
                        if (ret == 0)
                        {
                            jSonString = "{\"status\":\"error|" + ret.ToString() + "\"}";
                            break;
                        }
                    }
                    if (ret != 0)
                    { jSonString = "{\"status\": \"success\"}"; }

                }

            }

            catch (Exception ex)
            {
                jSonString = "{\"status\":\"error\" ,\"message\":\"" + ex.Message.ToString() + "\"}";
            }
            finally
            {
                context.Response.Write(jSonString);
            }
        }