public void Upd_ByCode(HttpContext context, int NUM_LANG)
        {
            int ret = -1;
            String jSonString = "";
            try
            {
                if (NUM_LANG < 1)
                {
                    NUM_LANG = 1;
                }
                List<CategoryLevel2> aListCategoryLevel2 = new List<CategoryLevel2>();
                CategoryLevel2BO aCategoryLevel1BO = new CategoryLevel2BO();
                String Code = context.Request.Form["txtCode"];

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

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

                        aListCategoryLevel2[i].ID = aListCategoryLevel2[i].ID;
                        aListCategoryLevel2[i].Code = aListCategoryLevel2[i].Code;
                        aListCategoryLevel2[i].IDLang = aListCategoryLevel2[i].IDLang;
                        aListCategoryLevel2[i].Type = !String.IsNullOrEmpty(context.Request.Form["cbbType"]) ? Convert.ToInt32(context.Request.Form["cbbType"]) : aListCategoryLevel2[i].Type;
                        aListCategoryLevel2[i].ViewCount = !String.IsNullOrEmpty(context.Request.Form["txtViewCount"]) ? Convert.ToInt64(context.Request.Form["txtViewCount"]) : 0;
                        aListCategoryLevel2[i].Status = !String.IsNullOrEmpty(context.Request.Form["cbbStatus"]) ? Convert.ToInt32(context.Request.Form["cbbStatus"]) : aListCategoryLevel2[i].Status;
                        aListCategoryLevel2[i].Disable = !String.IsNullOrEmpty(context.Request.Form["cbbDisable"]) ? Convert.ToBoolean(context.Request.Form["cbbDisable"]) : aListCategoryLevel2[i].Disable;
                        aListCategoryLevel2[i].Tag = !String.IsNullOrEmpty(context.Request.Form["txtTag"]) ? Convert.ToString(context.Request.Form["txtTag"]) : aListCategoryLevel2[i].Tag;
                        aListCategoryLevel2[i].IDAlbum = !String.IsNullOrEmpty(context.Request.Form["cbbIDAlbum"]) ? Convert.ToInt32(context.Request.Form["cbbIDAlbum"]) : aListCategoryLevel2[i].IDAlbum;
                        aListCategoryLevel2[i].Image = !String.IsNullOrEmpty(context.Request.Form["txtImage_1"]) ? Convert.ToString(context.Request.Form["txtImage_1"]) : "";
                        aListCategoryLevel2[i].Image1 = !String.IsNullOrEmpty(context.Request.Form["txtImage_2"]) ? Convert.ToString(context.Request.Form["txtImage_2"]) : "";
                        aListCategoryLevel2[i].Image2 = !String.IsNullOrEmpty(context.Request.Form["txtImage_3"]) ? Convert.ToString(context.Request.Form["txtImage_3"]) : "";
                        aListCategoryLevel2[i].Image3 = !String.IsNullOrEmpty(context.Request.Form["txtImage_4"]) ? Convert.ToString(context.Request.Form["txtImage_4"]) : "";
                        aListCategoryLevel2[i].CategoryNameLevel2 = !String.IsNullOrEmpty(context.Request.Form["txtCategoryNameLevel2_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtCategoryNameLevel2_Lang" + (i + 1)]) : aListCategoryLevel2[i].CategoryNameLevel2;
                        aListCategoryLevel2[i].Note = !String.IsNullOrEmpty(context.Request.Form["txtNote_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtNote_Lang" + (i + 1)]) : aListCategoryLevel2[i].Note;
                        aListCategoryLevel2[i].Intro = !String.IsNullOrEmpty(context.Request.Form["txtIntro_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtIntro_Lang" + (i + 1)]) : aListCategoryLevel2[i].Intro;
                        aListCategoryLevel2[i].Info = !String.IsNullOrEmpty(context.Request.Form["txtInfo_Lang" + (i + 1)]) ? Convert.ToString(context.Request.Form["txtInfo_Lang" + (i + 1)]) : aListCategoryLevel2[i].Info;

                        ret = aCategoryLevel1BO.Upd(aListCategoryLevel2);
                        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);
            }
        }
        public void Upd_Disable(HttpContext context)
        {
            int ret = -1;
            String jSonString = "";
            try
            {
                CategoryLevel2BO aCategoryLevel2BO = new CategoryLevel2BO();
                List<CategoryLevel2> listCategoryLevel2 = new List<CategoryLevel2>();
                string Code = aCategoryLevel2BO.Sel_ByID(int.Parse(context.Request.QueryString["IDCategoryLevel2"])).Code;

                for (int i = 0; i < listCategoryLevel2.Count; i++)
                {
                    listCategoryLevel2[i].Disable = true;
                    ret = aCategoryLevel2BO.Upd(listCategoryLevel2[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);
            }
        }