Example #1
0
        public IHttpActionResult Put(System.Guid id, mstRekananForm myData)
        {
            mstRekanan rekTemp = new mstRekanan();

            rekTemp.InjectFrom(myData);
            rekTemp.Note   = "Update: Profile";
            rekTemp.LMDate = DateTime.Today;
            _repository.Put(id, rekTemp);
            return(StatusCode(HttpStatusCode.NoContent));
        }
Example #2
0
        public IHttpActionResult Post(mstRekananForm myData)
        {
            //membuat data rekanan yang baru, akan meng-insert data contact
            mstContact contactTemp = new mstContact();

            contactTemp.UserId      = myData.CreatedUser;
            contactTemp.IdRekanan   = myData.IdRekanan;
            contactTemp.Name        = myData.UserName;
            contactTemp.Title       = string.Empty;
            contactTemp.CreatedUser = myData.CreatedUser;
            contactTemp.CreatedDate = DateTime.Today;
            contactTemp.IsActive    = true;
            _repContact.Post(contactTemp);

            mstRekanan rekTemp = new mstRekanan();

            rekTemp.InjectFrom(myData);
            rekTemp.LMDate = DateTime.Today;
            _repository.Post(rekTemp);
            return(Ok(rekTemp));
        }