Esempio n. 1
0
        //UPDATE EVENT
        public static string UpdateEvent(EventViewModel paramEv)
        {
            string latestSaveCode = string.Empty;

            try
            {
                using (var db = new MarkomApplicationDBEntities())
                {
                    ObjectParameter returnId = new ObjectParameter("Code", typeof(string));
                    db.spEventUpdate(
                        paramEv.id
                        , returnId
                        , paramEv.eventName
                        , paramEv.place
                        , paramEv.startDate
                        , paramEv.endDate
                        , paramEv.budget
                        , paramEv.note
                        , paramEv.updateBy
                        , paramEv.updateDate);
                    latestSaveCode = (String)returnId.Value;
                }
            }
            catch (Exception ex)
            {
                Message = ex.Message;
            }

            return(latestSaveCode);
        }