Exemple #1
0
        public JsonResult SignagePlaceSave(SIGNAGE_PLACE_SAVE param)
        {
            param.REG_CODE = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
            RTN_SAVE_DATA data = new LoggalBoxService().SignagePlaceSave(param);

            return(new JsonResult {
                Data = data
            });
        }
Exemple #2
0
        /// <summary>
        /// T_SIGNAGE_PLACE 저장하기(로컬사이니지장소 - T_SIGNAGE_PLACE 저장 -  saveparam Query)
        /// </summary>
        /// <param name="Param"></param>
        /// <returns></returns>
        public RTN_SAVE_DATA SignagePlaceSave(SIGNAGE_PLACE_SAVE param)
        {
            RTN_SAVE_DATA rtn = new RTN_SAVE_DATA();

            try
            {
                param.list = param.list == null ? new List <T_SIGNAGE_PLACE>() : param.list;
                using (TransactionScope tran = new TransactionScope())
                {
                    string sql = Global.DBAgent.LoadSQL(sqlBasePath + "Signage\\T_SIGNAGE_PLACE.xml", "SignagePlaceDelete", param.SIGN_CODE.ToString("0"), param.PLACE_TYPE.ToString("1"));
                    rtn = db.ExecuteQuery <RTN_SAVE_DATA>(sql).FirstOrDefault();
                    foreach (T_SIGNAGE_PLACE data in param.list)
                    {
                        sql = Global.DBAgent.LoadSQL(sqlBasePath + "Signage\\T_SIGNAGE_PLACE.xml", "SignagePlaceSave"
                                                     , data.IDX.ToString("")
                                                     , param.SIGN_CODE.ToString("0")
                                                     , param.PLACE_TYPE.ToString("1")
                                                     , data.CK_CODE.ToString("")
                                                     , data.REGION.ToString("")
                                                     , data.JIBUN_ADDRESS.ToString("")
                                                     , data.ROAD_ADDRESS.ToString("")
                                                     , data.BUILDING.ToString("")
                                                     , data.ZIP_CODE.ToString("")
                                                     , data.LATITUDE.ToString("")
                                                     , data.LONGITUDE.ToString("")
                                                     , data.RADIUS.ToString("500")
                                                     , data.REMARK.ToString("")
                                                     , param.REG_CODE.ToString()

                                                     );
                        rtn = db.ExecuteQuery <RTN_SAVE_DATA>(sql).FirstOrDefault();
                        if (!string.IsNullOrEmpty(rtn.ERROR_MESSAGE))
                        {
                            throw new Exception(rtn.ERROR_MESSAGE);
                        }
                    }
                    tran.Complete();
                }
            }
            catch (Exception ex)
            {
                rtn.ERROR_MESSAGE = ex.Message;
            }
            return(rtn);
        }