public ActionResult Search(SEC000P001Model model)
        {
            var da = new SEC000P001DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SEC000P001ExecuteType.GetAll;
            if (Request.GetRequest("page").IsNullOrEmpty())
            {
                model.IsDefaultSearch = true;
                TempSearch            = model;
            }
            da.DTO.Model = TempSearch;
            da.Select(da.DTO);
            return(JsonAllowGet(da.DTO.Models, da.DTO.Result));
        }
        public ActionResult Edit(string COM_CODE, string COM_BRANCH, SEC000P001Model model)
        {
            SetDefaulButton(StandardButtonMode.Modify);

            var da = new SEC000P001DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SEC000P001ExecuteType.GetByID;
            TempModel.COM_CODE         = da.DTO.Model.COM_CODE = COM_CODE.ToString();
            TempModel.COM_BRANCH       = da.DTO.Model.COM_BRANCH = COM_BRANCH.ToString();
            da.Select(da.DTO);
            if (da.DTO.Model != null)
            {
                model.COM_POST_CODE_E = da.DTO.Model.COM_CODE;   //เอาค่ารหัสไปษณีออกมาเเสดง
                model.COM_FAC_POST_E  = da.DTO.Model.COM_CODE;
                localModel            = da.DTO.Model;
            }
            SetDefaultData();   //set ค่า DDL


            return(View(StandardActionName.Edit, localModel));
        }