Пример #1
0
        public MessageModel SavePathology(PathologyMaster Pathology)
        {
            int saveService = new ServiceGateway().PathologySave(Pathology);

            if (saveService > 0)
            {
                messageModel.MessageBody  = "save successfully.";
                messageModel.MessageTitle = "Successfull";
            }
            return(messageModel);
        }
Пример #2
0
        public int PathologySave(PathologyMaster Pathology)
        {
            Command = new SqlCommand("INSERT INTO tblPathology (PathologyName,Address,Alias,PathId,UserID)"
                                     + "VALUES(@PathologyName,@Address,@Alias,@PathId,@UserID)", Connection);

            Command.CommandType = CommandType.Text;

            Command.Parameters.AddWithValue("@PathologyName", Pathology.PathologyName);
            Command.Parameters.AddWithValue("@Address", Pathology.Address);
            Command.Parameters.AddWithValue("@Alias", Pathology.Alias);
            Command.Parameters.AddWithValue("@PathId", Pathology.PathId);
            Command.Parameters.AddWithValue("@UserID", Pathology.UserId);
            int count = Command.ExecuteNonQuery();

            return(count);
        }