public JsonResult InsertCalendar(Calendar _param)
        {
            int result = 0;

            try
            {
                DaoFactory.BeginTransaction();
                DObject dObj = new DObject();
                dObj.Name    = _param.Name;
                dObj.Type    = CommonConstant.TYPE_CALENDAR;
                dObj.TableNm = CommonConstant.TABLE_CALENDAR;
                dObj.TdmxOID = DObjectRepository.SelTdmxOID(new DObject {
                    Type = dObj.Type
                });
                dObj.IsLatest = 1;
                int dOid = DObjectRepository.InsDObject(dObj);

                _param.OID = dOid;
                DaoFactory.SetInsert("Manage.InsCalendar", _param);

                List <CalendarDetail> holidayDefault = DaoFactory.GetList <CalendarDetail>("Manage.SelCalendarHolidayDefailt", null);
                holidayDefault.ForEach(item =>
                {
                    item.CalendarOID = dOid;
                    DaoFactory.SetInsert("Manage.InsCalendarDetail", item);
                });
                DaoFactory.Commit();
            }
            catch (Exception ex)
            {
                DaoFactory.Rollback();
                return(Json(new ResultJsonModel {
                    isError = true, resultMessage = ex.Message, resultDescription = ex.ToString()
                }));
            }
            return(Json(result));
        }